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]. Even if you succeed in making access to @_ as fast as access to $a and $b (i.e. ignore the stack setup time), access to $_[0] will still be slower than to $a because of the array index. Or are you saying that the compiler should optimize and treat "$_[0]" as a whole? Still, sort { $_[0] <=> $_[1] } @list is very ugly. I *like* the syntax of sort { $a <=> $b } @list Very neat: it *looks* simple. Very Perlish, too: a custom syntax for a custom application of a function. If you insist on not using $a and $b in sub customsort { .... } sort \&customsort @list well, I could live with that. Does that solve your "strict" problem? p.s. I can't see how this still relates to the subject line. -- Bart.
- Re: RFC 76 (v1) Builtin: reduce John Porter
- Re: RFC 76 (v1) Builtin: reduce Piers Cawley
- Re: RFC 76 (v1) Builtin: reduce Graham Barr
- Re: RFC 76 (v1) Builtin: reduce Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Adam Krolnik
- Re: RFC 76 (v1) Builtin: reduce Jarkko Hietaniemi
- Re: RFC 76 (v1) Builtin: reduce Nathan Wiger
- 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: reduc... Bart Lateur
- Re: RFC 76 (v1) Builtin: reduc... Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduc... Damian Conway
- Re: RFC 76 (v1) Builtin: reduce Ariel Scolnicov
- Re: RFC 76 (v1) Builtin: reduce Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduce Jarkko Hietaniemi
- Re: RFC 76 (v1) Builtin: reduce Larry Wall
- Re: RFC 76 (v1) Builtin: reduce Nathan Wiger
- Re: RFC 76 (v1) Builtin: reduce Jeremy Howard
- Re: RFC 76 (v1) Builtin: reduce Glenn Linderman
- Re: RFC 76 (v1) Builtin: reduce Damian Conway