Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97710 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42166 invoked from network); 11 Jan 2017 22:43:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2017 22:43:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=dave@mudsite.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dave+php@mudsite.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain mudsite.com designates 209.85.213.46 as permitted sender) X-PHP-List-Original-Sender: dave@mudsite.com X-Host-Fingerprint: 209.85.213.46 mail-vk0-f46.google.com Received: from [209.85.213.46] ([209.85.213.46:35742] helo=mail-vk0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7B/32-30525-4F4B6785 for ; Wed, 11 Jan 2017 17:43:02 -0500 Received: by mail-vk0-f46.google.com with SMTP id x75so1522200vke.2 for ; Wed, 11 Jan 2017 14:43:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mudsite-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=sLHtGP4T+eoVSd8yt7J/1f9Nev2E98y9DWEJPyHZC2o=; b=sldeEZIgQTm0QclcXmuguFQK5wfFC6k7GJvU5/Rix/e9fb1tTAHNg1r37CLqimN+aW dBJmNjgMnEvPHyASRflvQyvt4bJIYzWlo8oZswlRerkiXlUlD6s5bVaXqH7Fpez0QPe9 LBvR5sUOtji7UwnSN3RDBKBQTsf/5AHLqkc9l/z1ArdjCWqZZ4+Y+rQ2R2vH6gXebjYU F246KT3fadN0sYAPSLOvEd0/4Ac22dWLI4R4D8oqTgGkdotOrdgGALlhd5dDbvsNAPk0 cMWot9vT+t3j8CnUdMQHkag3U18euK5lUViIePfwMA68yxitvyX2MAAnPN0ZafeDxbA8 b2qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=sLHtGP4T+eoVSd8yt7J/1f9Nev2E98y9DWEJPyHZC2o=; b=TgQnkN252TqbKj/l3RIT/iiyVGOLDqZXV5/+LjQaE5r+Cdsukh3LHoNh/SrKFFYH7r KKpCMP9/Vs+OYwVGgochD/K3J/eBw4l+Fl2Bjpg6zZmf5iVZs1XpGjQa3/Jn8e6POF7l JqUCVKmWFOAjeJepgUasOR6ozxkjJjs4QDrkfzSg0+b2zSudssPYLOy5rZmVnKngh53K fewx7lXkZmeuog0K8k2qqsUvNG9lCBKe2tb6Pzj+FEpJvkpTs4hglSU3YG9YZ0ixqJFx iQ+i/pVlH3YHaPgSfK9UUj0wMZGxcROoegMS4Ds8v+U2QAzJrk6HjrblaU5CfAUPnjW/ IeXQ== X-Gm-Message-State: AIkVDXKpPV4jwMvDMNgRlKCINV5sGl7aQ3cX/BwCnc21eEknTUuy2f0zDC03ay6cXk689G1vkBYmMcqhs+YwlQ== X-Received: by 10.31.6.72 with SMTP id 69mr4259057vkg.19.1484174577569; Wed, 11 Jan 2017 14:42:57 -0800 (PST) MIME-Version: 1.0 References: <33.00.30525.16EA6785@pb1.pair.com> In-Reply-To: <33.00.30525.16EA6785@pb1.pair.com> Date: Wed, 11 Jan 2017 22:42:46 +0000 Message-ID: To: Andrea Faulds , PHP internals Content-Type: multipart/alternative; boundary=001a1143dc6c7b25470545d952a1 Subject: Re: [PHP-DEV] Re: [RFC][Discussion] - list() reference syntax From: dave+php@mudsite.com (David Walker) --001a1143dc6c7b25470545d952a1 Content-Type: text/plain; charset=UTF-8 On Wed, Jan 11, 2017 at 3:15 PM Andrea Faulds wrote: > 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. > Duly noted. I too would prefer not to implement it as well, keeping just one supported syntax. Although, since both syntaxes were raised as potential implementations in the bugs I thought it would be something to at least ask everyone to consider. Better to raise the subject and have everyone concur not to do it, than to ignore it, imo. Going forward, I guess I'd like to know if anyone -would- want to support it. > 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. > Yup, you're right. list() = and [] = do seem to follow the same compilation/execution so there's no difference. I'll make sure to note it in the RFC just to note. Cheers -- Dave --001a1143dc6c7b25470545d952a1--