Larry Wall wrote:
> Jarkko Hietaniemi writes:
> : > > (Yes, there is a small aesthetic edge in using $a vs $_[0], but I
still
> : > > consider the $ and $b to be warts.)
> : > >
> : > And anyhow, this will work just fine (see RFC 23):
> : >
> : >   $sum = reduce ^a + ^b, @numbers;
> :
> : I have been amply reminded of this, thanks :-)  (Too little time
> : to spend on RFCs...)
>
> Yes, but has anyone pointed out that
>
>    @out = sort ^b cmp ^a, @in;
>
> won't do what people will certainly think it ought to?
>
Except that Perl 6 people will know all about numbered parameters, so they
will write:

  @out = sort ^2 cmp ^1, @in;

and it will work just as they expect! (See RFC 23 for information about how
numbered, named, and anonymous placeholders get filled in).


Reply via email to