Re: Add spaceship assignment operator
| From: | James Titcumb | Date: | Thu, 24 Mar 2016 20:12:11 +0000 |
| Subject: | Re: Add spaceship assignment operator | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-91924@lists.php.net to get a copy of this message | ||
On 24 Mar 2016 19:43, "Mutlu Kocak" <mtkocak@mtkocak.net> wrote:
>
> he is trolling :)
>
I wouldn't dismiss this idea straight off. I can see a lot of practical
uses for chaining assignment operators, like:
$a !==<=>==== $b;
Expanded from:
$a = $a !== (($a <=> $b) === $b);
Which is something I often do in my production applications. In fact I
typed this exact use case about 12 times just today.
It's a good, expressive way of simplifying code and increasing readability.
This would really complete the language IMO.