Re: Re: Combined assignment operator for short ternary
Am 25.08.2012 01:00, schrieb Stas Malyshev:
Hi!
To point that out: I _don't_ want to change the behaviour, which means
| $foo['xy'] ?:= 'bar';
would trigger a notice like
| $foo['xy'] = $foo['xy'] ?: 'bar';
Then I personally don't see much point in it. Saving a couple of
keystrokes IMHO is not really worth it.
Hi,
It's like with any other compound operator: A _real_ reason isn't there. But saying "It's not worth it" is something I can live with (even if I don't know how much effort it would take ;)). I just asked myself: '?:' is (a kind of?) binary operator and every other binary operator is available as compound operator, so why not '?:', so I don't have to repeat the variable?
Regards,
Sebastian
Thread (18 messages)