[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] @$a[0] = 5;



>>>>> "Christian" == Christian Borup <borup@borup.com> writes:

Christian> Peter Scott wrote:
>> At 09:36 AM 7/4/99 -0700, Randal L. Schwartz wrote:
>> >But the point is really that $a and $b is "use strict" immune.  Try
>> >the same example with $c and $d, and you'll see. :)
>> 
>> I've always wondered whether there was a reason to use $a and $b for sort
>> subs instead of @_[0,1].  Is it just an accident of history which is too
>> late to undo?

Christian> $a and $b seems to be accidents of history indeed (along with $AUTOLOAD).

Probably because aliasing a scalar might be a faster operation than
setting up a full argument stack.  And since you call the comparison
routine n log n times, you want it to be fast in, fast out.

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe