NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
hyperoperators (Score:1)
@c = map({$a + $b} @a, @b)
beeing much more backward-compatible, less line-noisy and more flexible.
Re:hyperoperators (Score:1)
For one, it moves away from a functional interface to an operator interface, which may be more line-noisy, but I think is cleaner. Count the line-noise symbols in your two statements.
Two, I seem to recall reading some discussion about trying to get rid of $a and $b. (Could be wrong).
Three, it's a different way of looking at it. with map you are doing something to a set of data. Your view of that data is abstracted through map(), which makes this less intuitive to the new user. With an operator, its really the same concept as the base operator, applied over the list. Much easier for the new programmer
Reply to This
Parent