develooper Front page | perl.perl5.porters | Postings from October 2014

Re: [perl #122947] [EXPERIMENT] Lvalue references

Thread Previous | Thread Next
Ricardo Signes
October 14, 2014 15:18
Re: [perl #122947] [EXPERIMENT] Lvalue references
Message ID:
* Father Chrysostomos via RT <> [2014-10-14T09:45:31]
> On Tue Oct 14 05:47:48 2014, wrote:
> > Since I haven't much played with it yet, I don't have much to say, except
> > this: I think "lvalue reference" might need to be renamed.  My
> > understanding is that it's always about the backslash on the left hand
> > side, rather than having a reference in an lvalue.
> ‘Assigning to references’ is the least ambiguous way to refer to it that I
> can think.  How do we abbreviate that into a feature name?  If we call it
> refassign, it’s ambiguous again, because reference assignment would be
> assignment of references.

From the user's perspective, is there actually a reference involved in the left
hand side?  The assignment forces \$left to refer to the same thing as \$right,
but it doesn't in anyway [that I conceive of the phrase] assign to a reference.

Why not just "aliasing"?  The use of \ makes sense, and can (I think) be taught
easily, but I think that actually calling it a lvalue reference or an
assignment to a reference begins to confuse things that are distinct.


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