develooper Front page | perl.perl6.language | Postings from March 2005

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

Thread Previous | Thread Next
From:
Chip Salzenberg
Date:
March 30, 2005 14:58
Subject:
Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?
Message ID:
20050330161845.GF17528@perlsupport.com
According to Luke Palmer:
> [Perl 5] had to construct lvalues out of all arguments (for which
> that made sense) because the sub might modify them.

No, actually, that wasn't the reason.  Perl 5 passes all values by
implicit mutable reference because it's faster, not because it's
better.  I suspect Larry might have passed arguments by read-only
reference in Perl 5 as well, had he found a way to make it fast.
-- 
Chip Salzenberg            - a.k.a. -            <chip@pobox.com>
         Open Source is not an excuse to write fun code
            then leave the actual work to others.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About