in reply to Re: map weirdness
in thread map weirdness
Excellent post, but I feel like I need to write in defense of the "first approach." Not only is it "easier to follow, if you're new to Perl," but I think it's easier to follow even if you're not new to Perl. In other words, it's simply clearer code.
I say this because map and grep have fairly common, specific uses. Nearly anyone reading the code will immediately recognize grep as filtering the results. Shoving that logic into the map block fails to take advantage of that quick recognition. It may not seem like a lot, but these things add up.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: map weirdness
by jonadab (Parson) on Dec 14, 2004 at 14:50 UTC |