DEV Community

Discussion on: When DRY Doesn't Work, Go WET

Collapse
jappyjan profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
jappyjan

Sorry but this is BS....
Pure BS.

Most of not all mentioned situations may be solved by extending classes/components instead of copying or creating abstractions while maintaining dry and all its advantages.
This article is dangerous to code newbies...

Collapse
milestonedev profile image
Justin Miles

Agree. I was reading thinking it was satire.

Collapse
stereoplegic profile image
Mike Bybee • Edited on

This article is dangerous to code newbies...

So is preaching the inheritance rabbit hole without covering the 5-10% edge cases the article mentions.

As another commenter mentioned, you can plan the abstractions better (without all the at-least-as-dumb unnecessary inheritance) when you can see the duplications.

Collapse
jappyjan profile image
jappyjan

Totally agreee. But this article make it seem like you should always copy code...

Thread Thread
stereoplegic profile image
Mike Bybee • Edited on

Then you read it (or arrived at your conclusion) too quickly. It says not to prematurely DRY your code.