top | item 10894165

(no title)

mollmerx | 10 years ago

A "good" language might let you run "5 < x" when x is a list and return a list of booleans. This is what languages in the APL family do.

discuss

order

awwaiid|10 years ago

I think Perl 6 gets to claim some APL-ness :) . Though you do sometimes need to be explicit:

    my @x = 3,4,5,6;
    say "yep" if 5 < @x.any; # yep!

    (5 < @x.any).perl.say
    # output: any(Bool::False, Bool::False, Bool::False, Bool::True)
(edit: forgot to add the full junction output)

mollmerx|10 years ago

Absolutely!

Also, the inclusion of non-ASCII operators harkens back to APL. Mind mind isn't yet made up on whether I like this. I anticipate code being easier to read and harder to type. Given perl5's reputation in this regard, I'm optimistic I'll find it to be an improvement.