Hacker News new | ask | show | jobs
by RealDinosaur 2349 days ago
I think the catch all term for that is YAGNI.
2 comments

YAGNI is about not adding functionality until it's needed. DRYing code isn't adding functionality.
I think GP is implying the thing you're not going to need is a generic solution to the repetition. i.e: DRY is in fact a feature.
DRYing existing code to handle exactly what is needed to support the current uses with no additional axes of variation isn't adding functionality (well, if it handles more than the existing values in the existing axes of variation, it's adding some but arguably de minimis functionality.)

Building code with support for currently-unused variation to support expected future similar-but-not-identical needs, that is, pre-emptively DRYing future code, is adding functionality.

WET - Write Everything Twice
What is YAGNI?
You Ain't Gonna Need It