Re: Re: [RFC Proposal] Null Coalesce Equal Operator
From: Björn Larsson Date: Thu, 24 Mar 2016 15:51:12 +0000 Subject: Re: Re: [RFC Proposal] Null Coalesce Equal Operator References: 1 2 3 4 5 Groups: php.internals Request: Send a blank email to [email protected] to get a copy of this message
Couldn't agree more :) //Björn Den 2016-03-24 kl. 16:49, skrev Sara Golemon:Changing "equal" to "assignment" seems to have been the suggestion. I've taken that into the short-ternary version. And as a minor edit (not worth closing/reopening vote) would recommend the same for null coallesce. -Sara On Thu, Mar 24, 2016 at 8:46 AM, Midori Kocak <[email protected]> wrote:there were no suggestions. Do you have one?On 24 Mar 2016, at 16:36, Björn Larsson <[email protected]> wrote: Den 2016-03-13 kl. 02:59, skrev Andrea Faulds:-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.phpHi Midori, Midori Kocak wrote:Any conclusion on naming of operator, remain or change? Regards //BjörnForgive my rookieness and let me introduce my first RFC here: https://wiki.php.net/rfc/null_coalesce_equal_operator <https://wiki.php.net/rfc/null_coalesce_equal_operator>I think this is a reasonable proposal. I had foreseen that we might add a ??= operator some day when I wrote the original RFC for the ?? operator. I do have one thing to add, though. It's something of a nitpick, but the name ought to be the "null-coalescing assignment operator". This would follow the convention of referring to +=, -= etc. as compound/combined assignment operators[1][2], not "equal" operators (which sounds more like what == and === do, to me) and avoids the mistake ("coalesce" instead of "coalescing") that I originally made in my RFC for ??.[3] I think that RFC naming is important, because the name the author chooses for a feature tends to be the one that ends up in the manual. Anyway, thank you for your RFC! [1] http://php.net/manual/en/language.operators.assignment.php [2] https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#compound-assignment [3] https://blog.ajf.me/2015-12-07-poorly-named-rfcs
Thread (12 messages)
« previous | php.internals (#91902) | next » |
---|