Yeah, that isn't what DRY is aboutWell, that is a matter of interpretation and you did not provide any citations to support your interpretation.
From Don't Repeat Yourself (O'Reilly)
Every line of code that goes into an application must be maintained, and is a potential source of future bugs. Duplication needlessly bloats the codebase, resulting in more opportunities for bugsI contend that:
is better written as:a_very_long_name = a_very_long_name + 42;
because (the completely unnecessary) duplication of a_very_long_name is eliminated thus eliminating a "potential source of future bugs" and reducing "opportunities for bugs".a_very_long_name += 42;
Of course, DRY is much broader than that. Yet that doesn't mean my interpretation of it here is wrong. Indeed, the wikipedia DRY page gives a very broad interpretation:
a principle of software development, aimed at reducing repetition of information of all kinds
In reply to Re^3: Convert undef to empty string in a hash
by eyepopslikeamosquito
in thread Convert undef to empty string in a hash
by ibm1620
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |