in reply to Perl6 - value vs. reference issues
Some handwaving in overloading mitigates this. But I see the issues getting worse in Perl6.
I'm certainly no expert on Perl6, but my understanding of this from the literature I've seen is that:
Which when you add it all up, means that clases like "scalar" and "array" can define the assignment operator to make a new copy of the rvalue and return that copy, while the assignment operator for whatever Abstract Base class all user defined classes subclass by default will probably have the assignment operator defined to return a reference to the rvalue.
(Assuming of course, that the Perl6 design folks want assignment of scalars/arrays/objects to work exactly the same way it does in Perl5 -- and even if they don't I'm sure Damian will write a "copyprmativesbyvalue" pragama that people can use.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl6 - value vs. reference issues
by John M. Dlugosz (Monsignor) on Sep 16, 2002 at 20:05 UTC |