develooper Front page | perl.perl5.porters | Postings from August 2013

Re: postfix dereference syntax

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
August 14, 2013 12:01
Subject:
Re: postfix dereference syntax
Message ID:
20130814114906.GB7468@cancer.codesimply.com
* Father Chrysostomos <sprout@cpan.org> [2013-08-14T02:08:00]
> Also, where do we stop?  What about "$my_sub->()"?

We stop at the point where we are no longer keeping postfix syntax in line with
the circumfix forms which already interpolate.  The slope isn't slippery, nor
is it even sloped.  It's about keeping things level.

> Since interpolation juxtaposes code with literal text with no inter-
> vening operators or delimiters, I think it is important to keep it
> conceptually simple.  It is already a mental burden to deal with the
> difference between /$a[1]/ and /$a[123]/.  Please don’t complicate it
> further.  We already have too many exceptions to remember.

« $x->@* acts exactly like @$x » is the rule.  "Except in interpolation" would
be the exception.

-- 
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