by pmg101 · 1w ago · 0 comments
DRY doesn't mean don't repeat a similar looking block of code, it means try to structure your code so that each element of the design has a single representation.
There's no shortcut to good design where no thinking is required, much as a lot of people seem to wish there were.
But, like the rest of software, even that's just a guideline. Suppose you've been painted into a corner where code needs to be synced between languages. There are solutions, but especially if it happens rarely then those solutions might be a lot more expensive than just a comment at both locations.