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

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

Thread Previous | Thread Next
Aristotle Pagaltzis
October 14, 2014 21:51
Re: [perl #122947] [EXPERIMENT] Lvalue references
Message ID:
* Father Chrysostomos via RT <> [2014-10-14 15:50]:
> ‘Assigning to references’ is the least ambiguous way to refer to it
> that I can think.

But wrong. This has been bugging me all day, because the same confusion
is all over the thread, but I couldn’t put my finger on it until now.

References are values, whereas lvalue context is a syntactical property
of (part of) an expression. So this feature is not about references in
lvalue context. It is about reference *constructors* in lvalue context:
it requires a literal backslash on the left side of an assignment.

So, call the feature `refconsassign` maybe? I don’t know.

Personally I’m inclined to go with Rik right now, call it `varaliasing`.
That is the point of the feature from a user perspective after all. OTOH
that does not refer specially to a particular language mechanic for the
feature, but to a user requirement, so it is more ambiguous.

Basically as long as people need to spell the name of the feature it
makes more sense to me to call it something like `varaliasing` so the
user-facing interface is based on user-level concerns. But once it’s
rolled into `use 5.24` or whichever, and becomes invisible to the user,
it would make more sense to me if it were called such as `refconsassign`
as that names a particular feature in the language design from the
language designer perspective.

And the experimental phase will hopefully be brief while the long term
is, well, long. So after writing this mail I think I actually lean that
way – call it `refconsassign` or `lvalue_refcons` or something along
those lines.

Aristotle Pagaltzis // <>

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