|
|
| go ahead... be a heretic | |
| PerlMonks |
Re: Should I leave behind beautiful code or readable code?by grinder (Bishop) |
| on Mar 28, 2007 at 09:44 UTC ( #606960=note: print w/ replies, xml ) | Need Help?? |
|
I beg to differ, but I find that neither beautiful nor readable. At the expense of sounding like an old fart, I would privilege readability over beauty, which is, of course, in the eye of the beholder anyway. Especially for code you write for clients, I would shun dropping braces of maps (the speed optimisation is negligable) and implicit uses of $_. Spell it out: return map {split( ' ', uc($_), 2)} @somearray;This makes it pretty obvious that some sort of transform is being applied to @somearray, and that is what is being returned. I used to omit return until the day I tried to return an anonymous hash reference... • another intruder with the mooring in the heart of the Perl
In Section
Meditations
|
|
||||||||||||||||||||||