DEV Community

Discussion on: Stop trying to be so DRY, instead Write Everything Twice (WET)

Collapse
 
gtanyware profile image
Graham Trott

Rather than be prescriptive about the number of repetitions I would go for the gut reaction. If it tells me that repeating one or more further times will eventually cause me more effort than to stop now, wind back and code a single replacement, then it's time to do the latter. There's no rule that can (or needs to) be slavishly followed; we're supposed to be experts and able to make optimal decisions of this nature.