Bart Lateur wrote: > On Thu, 17 Aug 2000 07:44:03 +1000, Jeremy Howard wrote: > > >> $a and $b were done for speed: quicker to set up those global > >> variables than to pass values through the stack. > > >The solution is to pass args in as $_[0] and $_[1]. > > sort { $_[0] <=> $_[1] } @list > > is very ugly. > > I *like* the syntax of > > sort { $a <=> $b } @list > My original post actually said that the reason for this is that you can then write: sort { ^0 <=> ^1 } @list; ...which is pretty Perlish.
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Piers Cawley
- Re: RFC 76 (v1) Builtin: reduce Nathan Torkington
- Re: RFC 76 (v1) Builtin: reduce Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduce Bart Lateur
- Re: RFC 76 (v1) Builtin: reduce Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Ariel Scolnicov
- Re: RFC 76 (v1) Builtin: reduce Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduce Larry Wall
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Glenn Linderman
- Re: RFC 76 (v1) Builtin: reduce Glenn Linderman
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Glenn Linderman