Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Does anybody know why he introduced those hyperoperators @c = @a ^+ @b? I could imagine something like

    @c = map({$a + $b} @a, @b)

    beeing much more backward-compatible, less line-noisy and more flexible.
    • by swiftone (478) on 2001.10.05 12:05 (#1518)
      (this is all my conjecture)

      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