Re: Add spaceship assignment operator
| From: | Bob Weinand | Date: | Thu, 24 Mar 2016 17:56:50 +0000 |
| Subject: | Re: Add spaceship assignment operator | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-91909@lists.php.net to get a copy of this message | ||
> Am 24.3.2016 um 18:50 schrieb Nikita Popov <nikita.ppv@gmail.com>:
>
> Hi internals!
>
> For consistency, we should add a spaceship assignment operator:
>
> $a <=>= $b;
> // same as
> $a = ($a <=> $b);
>
> Additionally, we should add an is-identical assignment operator:
>
> $a ==== $b;
> // same as
> $a = ($a === $b);
>
> Thank you for taking this proposal under consideration.
>
> Regards,
> Nikita
I see a problem with that … It’d be impossible to make it consistent with is-equal comparison…
=== is already is-identical comparison. So, no symbol for the is-equal assignment operator left.
As long as you don’t have any better suggestion, I’m sorry, but -1 on that.
Bob