Re: Add spaceship assignment operator
| From: | Yasuo Ohgaki | Date: | Fri, 25 Mar 2016 09:39:57 +0000 |
| Subject: | Re: Add spaceship assignment operator | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-91936@lists.php.net to get a copy of this message | ||
Hi all,
On Fri, Mar 25, 2016 at 11:25 AM, Pierre Joye <pierre.php@gmail.com> wrote:
> On Fri, Mar 25, 2016 at 12:50 AM, Nikita Popov <nikita.ppv@gmail.com> wrote:
>> Hi internals!
>>
>> For consistency, we should add a spaceship assignment operator:
>>
>> $a <=>= $b;
>> // same as
>> $a = ($a <=> $b);
>
> I miserably fail to imagine any use case for this.
>
>> Additionally, we should add an is-identical assignment operator:
>>
>> $a ==== $b;
>> // same as
>> $a = ($a === $b);
>>
>> Thank you for taking this proposal under consideration.
>
> Besides the comment about that one from Sara, I also fail to remotely
> imagine why one would need that.
>
> In short, yes, it is consistent but it is really unreadable, at best.
The same impression.
I suppose there aren't much use cases, are there?
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net