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

Re: for perl 7

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
August 15, 2021 01:13
Subject:
Re: for perl 7
Message ID:
cc852e0d-814e-4f35-9ee4-bdf83f0478a6@beta.fastmail.com
On Mon, Aug 9, 2021, at 1:28 PM, Saašha Metsärantala wrote:
> doSomething if ($foo =ne $baz);
> 
> where =ne would:
> 
> • check if $foo and $baz are different and temporarilly store the result of this comparison "somewhere".
> 
> • assign $baz into $foo
> 
> • return the result of the comparison previously stored (above)

Saašha,

Thanks for writing.  My concern is that this feels like a fairly special case, and that producing a very compact syntax will force the reader of Perl to learn even more syntax, rather than to rely on the existing syntax.  New dense syntax should be reserved for very powerful or common operations, and my feeling is that this is neither.

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