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
Chip Salzenberg
March 30, 2005 14:58
Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?
Message ID:
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. -            <>
         Open Source is not an excuse to write fun code
            then leave the actual work to others.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About