Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27843 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12272 invoked by uid 1010); 6 Feb 2007 00:21:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 12257 invoked from network); 6 Feb 2007 00:21:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2007 00:21:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=pollita@php.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pollita@php.net; sender-id=unknown; domainkeys=good Received-SPF: error (pb1.pair.com: domain php.net from 140.211.166.39 cause and error) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pollita@php.net X-Host-Fingerprint: 140.211.166.39 osu1.php.net Linux 2.4/2.6 Received: from [140.211.166.39] ([140.211.166.39:57049] helo=osu1.php.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/8B-43531-CF9C7C54 for ; Mon, 05 Feb 2007 19:21:17 -0500 X-DomainKeys: Ecelerity dk_sign implementing draft-delany-domainkeys-base-01 DomainKey-Signature: q=dns; a=rsa-sha1; c=nofws; s=mx; d=php.net; h=From:Subject:To:Date; b=yjVmNBEsvWCXeOTlNuazCmhewmP625ePP1/RjIMf6tY/rybwC3OFciNlgtqRLElc GkJYLbPA+/XKSt6IURaFm70ate7QjViR8wrBQPkGcTd2GiTqraTeGpVxNY7u/peG Authentication-Results: osu1.php.net smtp.user=pollita; auth=pass (LOGIN) X-Host-Fingerprint: 207.126.230.225 unknown Received: from [207.126.230.225] ([207.126.230.225:55992] helo=[10.72.106.237]) by osu1.php.net (ecelerity 2.1.1.11-rc1 r(13363/13364M)) with ESMTPSA (cipher=AES256-SHA) id E0/FA-27849-87AC7C54 for ; Mon, 05 Feb 2007 16:23:20 -0800 Message-ID: <45C7C9F4.9000909@php.net> Date: Mon, 05 Feb 2007 16:21:08 -0800 User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Andrei Zmievski CC: Todd Ruth , ceo@l-i-e.com, Andi Gutmans , Christian Schneider , internals@lists.php.net References: <011701c7482d$a39f6910$6500a8c0@zend.2k> <45C5EC63.7030605@cschneid.com> <1902.67.184.122.32.1170651145.squirrel@www.l-i-e.com> <3e74be4952d0cb2f771d095053225624@gravitonic.com> <1170700129.15039.219.camel@notebook.local> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Syntactic improvement to array From: pollita@php.net (Sara Golemon) I would argue that list() (and [] when used like list()) should remain a terminal expression. Yes it's possible to make it non-terminal, but I don't like what the resulting syntax winds up looking like. -Sara > Good question. If it's possible to make it behave this way, I don't see > why not. On the other hand, if you take list(), it can't be used in RHS. > > -Andrei > > On Feb 5, 2007, at 10:28 AM, Todd Ruth wrote: > >> Would this be legal? >> >> function f() { >> return [ 1, 2 ]; >> } >> >> $x = [ $a, $b ] = f(); >> >> In the end, would we have...? >> $a = 1; >> $b = 2; >> $x = array(1,2); >> >> I'm not trying to be positive or negative about the >> syntax. I'm just "testing" somewhat edge cases. >> >> - Todd