Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97704 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31097 invoked from network); 11 Jan 2017 22:14:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2017 22:14:58 -0000 X-Host-Fingerprint: 95.144.152.155 unknown Received: from [95.144.152.155] ([95.144.152.155:3052] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/00-30525-16EA6785 for ; Wed, 11 Jan 2017 17:14:58 -0500 Message-ID: <33.00.30525.16EA6785@pb1.pair.com> To: internals@lists.php.net References: Date: Wed, 11 Jan 2017 22:14:53 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 95.144.152.155 Subject: Re: [RFC][Discussion] - list() reference syntax From: ajf@ajf.me (Andrea Faulds) Hi Dave, Regarding the =& open issue in the RFC, I don't think the =& syntax makes sense to me. The thing on the right-hand side of a list() assignment is the array, not its values. It makes no difference for the purposes of assigning from its values if the array is a reference or not, so I'd expect the & here to do nothing at all. So, having the &s only on the left-hand side makes more sense to me. I think supporting =& would be a potential source of confusion. On a different note, the RFC doesn't mention support for the shorthand list() syntax introduced in 7.1 (i.e. `[&$a, &$b, &$c] = $arr;`). Since it shares its implementation with list(), I assume it is indeed supported, but you should probably explicitly whether or not it is, for clarity's sake. Thanks for your work on this! I'm glad to see it revived. :) -- Andrea Faulds https://ajf.me/