Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89905 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60543 invoked from network); 28 Dec 2015 03:56:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Dec 2015 03:56:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.181 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.214.181 mail-ob0-f181.google.com Received: from [209.85.214.181] ([209.85.214.181:34006] helo=mail-ob0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 44/31-51216-1F2B0865 for ; Sun, 27 Dec 2015 22:56:33 -0500 Received: by mail-ob0-f181.google.com with SMTP id rq8so1478454obb.1 for ; Sun, 27 Dec 2015 19:56:33 -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=tqyl3Whdx9VMOuM+WLwHQcbAIChPdSq7eNjozaCd1NQ=; b=Aclsxa46+lGS+zWEAx7P9LBjh2CARZhwrprhc2KwavMCBEW3XVRkYjgBPjzkXWn5eD XU9gwdUWRw7Bv3LeCsD1eE1B1Napu31E2sFYvgNGD3YgHmwgyjqWllwbhkcTT5QO5oUz PDpKjqfuywsZMPp61Mml++NZHlXTZbjFXeHpK0hIsRYxB9UB/ourlzh/fxRepYMz0b7v rvqHQDedVPmQliImA+/fiAofBRDl/qKaVbjGYAznIGBR1JXocv51p9byl3FFQkeqM29q ZWYrZ8KrpBAs/KsrgRG0YBiJUKOTj+tU4cW4VVSiZMVyMYonRQ8RUZhf+oW2lmqr0Nrl UuhA== MIME-Version: 1.0 X-Received: by 10.60.143.98 with SMTP id sd2mr31961831oeb.45.1451274989725; Sun, 27 Dec 2015 19:56:29 -0800 (PST) Received: by 10.202.64.136 with HTTP; Sun, 27 Dec 2015 19:56:29 -0800 (PST) In-Reply-To: <56807248.4060609@gmail.com> References: <56807248.4060609@gmail.com> Date: Mon, 28 Dec 2015 10:56:29 +0700 Message-ID: To: Stanislav Malyshev Cc: Julian Rhind , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] RFC proposal for alternative list syntax From: pierre.php@gmail.com (Pierre Joye) 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