Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91646 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4270 invoked from network); 13 Mar 2016 01:59:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Mar 2016 01:59:25 -0000 X-Host-Fingerprint: 176.248.189.170 unknown Received: from [176.248.189.170] ([176.248.189.170:7153] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E3/2B-14237-979C4E65 for ; Sat, 12 Mar 2016 20:59:24 -0500 Message-ID: To: internals@lists.php.net References: Date: Sun, 13 Mar 2016 01:59:14 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 176.248.189.170 Subject: Re: [RFC Proposal] Null Coalesce Equal Operator From: ajf@ajf.me (Andrea Faulds) Hi Midori, Midori Kocak wrote: > Forgive my rookieness and let me introduce my first RFC here: 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 -- Andrea Faulds https://ajf.me/