Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
End the DRY obsession (joelabrahamsson.com)
11 points by paulsilver on Aug 10, 2011 | hide | past | favorite | 1 comment


"I also remember being taught that a good way to ensure DRYness was to use inheritance..."

DRY has nothing to do with inheritance per se. Sure you get some functionality for free when extending something, but that's more of a nice side-effect.

As someone already pointed out in the comments, favoring composition over inheritance is likely to solve most of the problems the author is talking about.

Railing against DRY is just wrong if you consider the alternative. I'd rather have a list of static utility methods (what's wrong with those anyway) then the same line(s) of code copy pasted all over the place.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: