develooper Front page | perl.perl5.porters | Postings from July 2009

Re: (Tired? Dead?) argument opposed to := for Perl 5 aliasing syntax

Thread Previous
From:
Nicholas Clark
Date:
July 16, 2009 02:45
Subject:
Re: (Tired? Dead?) argument opposed to := for Perl 5 aliasing syntax
Message ID:
20090716094510.GJ60303@plum.flirble.org
On Wed, Jul 15, 2009 at 04:06:26PM -0500, David Nicol wrote:
> On Wed, Jul 15, 2009 at 12:13 PM, Eric Brine<ikegami@adaelis.com> wrote:
> > The only between that and my original post is that I combined
> >
> >           my $copy = $buf;
> >           $buf := $copy;
> >
> > into
> >
> >           $buf := my $copy = $buf;
> 
> so is := clearer than "lvalue reference syntax?"  In LRS, that would be
> 
>      my $copy = $buf;
>      \$buf = \$copy;
> into
>     \$buf = \(my $copy = $buf);
> 
> I don't know how small of a minority I am in, but LRS doesn't require a new
> syntax signifier that looks like other things.  When I see "$buf := $copy"

True. But looking at the LVALUE reference syntax, it's not immediately
obvious what it does either.

The argument in favour of adding a := operator to give the := syntax is that
Perl 6 is using that syntax, so it will become familiar, and that it's better
to converge than diverge.

Nicholas Clark

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About