Search code examples
oopdrysolid-principles

Is the set of SOLID principles missing an extra 'D'?


Although not a pure OOD principle - should DRY also be included when thinking about SOLID principles? If not - why not?


Solution

  • It's a bit like asking why you shouldn't add a monkey-wrench to a basket of apples: they're not really the same thing.

    SOLID is a set of principles that specifically address object-oriented design.

    DRY is, I'd say, somewhat orthogonal to those - it's a programming principle that can apply to anything you write.

    (Having said that, the acronym is almost too good to pass up on)