in reply to Re^2: Convert undef to empty string in a hash
in thread Convert undef to empty string in a hash
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Convert undef to empty string in a hash
by karlgoethebier (Abbot) on Jan 16, 2015 at 18:11 UTC | |
by Anonymous Monk on Jan 16, 2015 at 18:44 UTC | |
by karlgoethebier (Abbot) on Jan 17, 2015 at 09:40 UTC | |
by Anonymous Monk on Jan 17, 2015 at 01:08 UTC | |
Re^4: Convert undef to empty string in a hash
by Anonymous Monk on Jan 17, 2015 at 09:28 UTC | |
by eyepopslikeamosquito (Archbishop) on Jan 18, 2015 at 00:30 UTC | |
by LanX (Saint) on Jan 18, 2015 at 00:49 UTC | |
by Anonymous Monk on Jan 18, 2015 at 11:59 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |
In Section
Seekers of Perl Wisdom