3 ms·
Its more a general guideline. In practice we break it all the time because it's not always possible or we may want to trade off for something else (performance
by aleksiy123 4y ago
Its more a general guideline. In practice we break it all the time because it's not always possible or we may want to trade off for something else (performance in your case).
Though generally I think when we talk about DRY in the code style sense vs the data (source of truth) sense these are related but different.
However, even at Google there is a if_change_this_change_that lint rule to keep code changes between different files in sync. Meaning there's cases when you will have to define the same thing twice.
- kazinator 4y agoIf it's a general guideline, it reasonably extends to cover copy-paste code scenarios too.