5 ms·
YAGNI is about not adding functionality until it's needed. DRYing code isn't adding functionality.
by pytester 7y ago
YAGNI is about not adding functionality until it's needed. DRYing code isn't adding functionality.
- philipov 7y agoI 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.
- michaelcampbell 7y agoWET - Write Everything Twice
- dragonwriter 7y agoDRYing 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.