Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89906 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65890 invoked from network); 28 Dec 2015 05:40:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Dec 2015 05:40:04 -0000 Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.178 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.160.178 mail-yk0-f178.google.com Received: from [209.85.160.178] ([209.85.160.178:35872] helo=mail-yk0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D8/B1-51216-33BC0865 for ; Mon, 28 Dec 2015 00:40:04 -0500 Received: by mail-yk0-f178.google.com with SMTP id v14so2546102ykd.3 for ; Sun, 27 Dec 2015 21:40:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=20N/Jzv/0voQUp7nBbfmsCaHuaClF/LPTrfFHx01zHo=; b=V+BbB0NcY5f6HPXTT7TzrXplvLSPUWor9+2puc5/bRnPWvKc8UT5cFulnT8Qhflfwj paezDf1E3/f+aXmLF2Ni0Mbl67SfNrzbf8CHwnpBudar3HW+pMP+KmQVW1yaQv+eCqkc eIQZmNAvJEgLffH3b6W0Vb/XZ7EUX5XGbmsvNHC45puuJKix3Jr2Rc8Y7vjNltr5rjjW WrnODdztrCkK1kRWAUQJnGsYTJ1jgDY78r+iXV33yCeWebKlmhIWwBJYOWnMYE1YnJZ7 ueE6D6rp9l2CoRXxf4HCm6itfEqGXWooFExXbaK9ciIcsK3mK/PbOEGQwdbaIfO8Rlf7 JV8A== MIME-Version: 1.0 X-Received: by 10.13.223.69 with SMTP id i66mr24938087ywe.323.1451281201159; Sun, 27 Dec 2015 21:40:01 -0800 (PST) Received: by 10.37.223.12 with HTTP; Sun, 27 Dec 2015 21:40:01 -0800 (PST) Received: by 10.37.223.12 with HTTP; Sun, 27 Dec 2015 21:40:01 -0800 (PST) In-Reply-To: References: <56807248.4060609@gmail.com> Date: Sun, 27 Dec 2015 21:40:01 -0800 Message-ID: To: Pierre Joye Cc: PHP internals list , Julian Rhind , Stanislav Malyshev Content-Type: multipart/alternative; boundary=001a114fcea076eae20527eebc70 Subject: Re: [PHP-DEV] RFC proposal for alternative list syntax From: kris.craig@gmail.com (Kris Craig) --001a114fcea076eae20527eebc70 Content-Type: text/plain; charset=UTF-8 On Dec 27, 2015 7:56 PM, "Pierre Joye" wrote: > > On Mon, Dec 28, 2015 at 6:20 AM, Stanislav Malyshev wrote: > > Hi! > > > >> // With the new array syntax this has been improved to > >> > >> list ($a, $b) = [1, 2]; > >> > >> // I think this new syntax should logically extend to > >> > >> [$a, $b] = [1, 2]; > > > > list() and array() are two different language constructs, using the same > > syntax for them is a bad idea. > > I tend to agree here but it exists elsewhere and is quite handy. Also > the behavior of this expression, in this case, is obvious. > > > Cheers, > -- > Pierre > > @pierrejoye | http://www.libgd.org > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > This could be very nice shortcut to have. Seems intuitive enough; I doubt there'd be any serious confusion over this. You should draft an RFC for this, OP. --Kris --001a114fcea076eae20527eebc70--