Re: [PHP-DEV] Add spaceship assignment operator

2016-03-25 Thread Dmitry Stogov
I hope this is a joke. Lets try not to reinvent Perl. Thanks. Dmitry. From: Nikita Popov Sent: Thursday, March 24, 2016 20:50 To: PHP internals Subject: [PHP-DEV] Add spaceship assignment operator Hi internals! For consistency, we should add a

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-25 Thread Yasuo Ohgaki
Hi all, On Fri, Mar 25, 2016 at 11:25 AM, Pierre Joye wrote: > On Fri, Mar 25, 2016 at 12:50 AM, Nikita Popov wrote: >> Hi internals! >> >> For consistency, we should add a spaceship assignment operator: >> >> $a <=>= $b; >> // same as >> $a = ($a <=> $b); > > I miserably fail to ima

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Pierre Joye
Hi Nikita, On Fri, Mar 25, 2016 at 12:50 AM, Nikita Popov 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 i

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Alain Williams
On Thu, Mar 24, 2016 at 09:16:50PM +0100, Midori Kocak wrote: > actually it could be proposed to C in 1970 in a same manner for += operator > by saying +== and +=== and also +. But hence Dennis Ritchie is dead and > he accepted += as a founding father, we have no chance to ask him. Can we ask

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Midori Kocak
actually it could be proposed to C in 1970 in a same manner for += operator by saying +== and +=== and also +. But hence Dennis Ritchie is dead and he accepted += as a founding father, we have no chance to ask him. Can we ask maybe to Bjarne Stroustrup as being one of another founding father

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread James Titcumb
On 24 Mar 2016 19:43, "Mutlu Kocak" 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 produ

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Mutlu Kocak
he is trolling :) On Thursday, 24 March 2016, Nikita Popov wrote: > On Thu, Mar 24, 2016 at 8:05 PM, Sara Golemon > wrote: > > > On Thu, Mar 24, 2016 at 11:50 AM, Colin O'Dell > > > wrote: > > > Would your proposal also allow ! to work? > > > > > I think you means !===, which is "not-ident

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Nikita Popov
On Thu, Mar 24, 2016 at 8:05 PM, Sara Golemon wrote: > On Thu, Mar 24, 2016 at 11:50 AM, Colin O'Dell > wrote: > > Would your proposal also allow ! to work? > > > I think you means !===, which is "not-identical assignment" (!== =) > > ! is just *CRAZY TALK* > We shouldn't dismiss such t

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Colin O'Dell
You're right! Good call :) On Thu, Mar 24, 2016 at 3:05 PM Sara Golemon wrote: > On Thu, Mar 24, 2016 at 11:50 AM, Colin O'Dell > wrote: > > Would your proposal also allow ! to work? > > > I think you means !===, which is "not-identical assignment" (!== =) > > ! is just *CRAZY TALK* > >

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Alain Williams
On Thu, Mar 24, 2016 at 06:50:17PM +, Colin O'Dell wrote: > Would your proposal also allow ! to work? That would be: !=== (one less '=') There should also be: === and !== which are the compare-with-type-juggling and assign operators. So you have assignment operators: !=== === !==

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Sara Golemon
On Thu, Mar 24, 2016 at 11:50 AM, Colin O'Dell wrote: > Would your proposal also allow ! to work? > I think you means !===, which is "not-identical assignment" (!== =) ! is just *CRAZY TALK* -Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Colin O'Dell
Would your proposal also allow ! to work? Colin

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Ryan Pallas
Hi Nikita, On Thu, Mar 24, 2016 at 11:50 AM, Nikita Popov wrote: > Hi internals! > > For consistency, we should add a spaceship assignment operator: > > $a <=>= $b; > // same as > $a = ($a <=> $b); > I'm not sure I see a use case for this, when do you compare 2 values and replace on

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Joe Watkins
Morning Nikita, Apologies for my inconsistent use of language ... I meant to say shortened by one week. Cheers Joe On Thu, Mar 24, 2016 at 6:04 PM, Joe Watkins wrote: > Morning Nikita, > > Thanks for all your hard work. > > Since consistency is one of our main focuses, I move that

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Joe Watkins
Morning Nikita, Thanks for all your hard work. Since consistency is one of our main focuses, I move that the discussion period for this extremely important work is moved forward by one week. All in favour, say I. Cheers Joe On Thu, Mar 24, 2016 at 5:56 PM, Bob Weinand wrote: > >

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Mutlu Kocak
+1 On Thursday, 24 March 2016, Nikita Popov wrote: > 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; > // sa

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Sara Golemon
On Thu, Mar 24, 2016 at 10:56 AM, Bob Weinand wrote: >>$a $b; >>// same as >>$a = ($a === $b); >> > 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 > assig

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Bob Weinand
> Am 24.3.2016 um 18:50 schrieb Nikita Popov : > > 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 a

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Stanislav Malyshev
Hi! > > For consistency, we should add a spaceship assignment operator: > > $a <=>= $b; Or maybe we shouldn't? Not only it is quite ugly, I am struggling to imagine a use case in which one would need such a construct, and I would recommend rewriting any code that uses such construct. > Add

[PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Nikita Popov
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 cons