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

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

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
October 14, 2014 15:18
Subject:
Re: [perl #122947] [EXPERIMENT] Lvalue references
Message ID:
20141014151834.GA15559@cancer.codesimply.com
* Father Chrysostomos via RT <perlbug-followup@perl.org> [2014-10-14T09:45:31]
> On Tue Oct 14 05:47:48 2014, perl.p5p@rjbs.manxome.org 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.

-- 
rjbs

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