Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27739 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26717 invoked by uid 1010); 4 Feb 2007 14:23:41 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 26702 invoked from network); 4 Feb 2007 14:23:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2007 14:23:41 -0000 Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.226.6.51 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.226.6.51 darkcity.gna.ch Linux 2.5 (sometimes 2.4) (4) Received: from [195.226.6.51] ([195.226.6.51:41435] helo=mail.gna.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6A/24-54400-B6CE5C54 for ; Sun, 04 Feb 2007 09:23:40 -0500 Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id 07726B9C6C; Sun, 4 Feb 2007 15:23:37 +0100 (CET) Received: from unknown by localhost (amavisd-new, unix socket) id client-XXlP148r; Sun, 4 Feb 2007 15:23:35 +0100 (CET) Received: from [192.168.1.42] (217-162-171-242.dclient.hispeed.ch [217.162.171.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTP id 043EDB9C4A; Sun, 4 Feb 2007 15:23:34 +0100 (CET) Message-ID: <45C5EC63.7030605@cschneid.com> Date: Sun, 04 Feb 2007 15:23:31 +0100 User-Agent: Thunderbird 1.5.0.9 (Macintosh/20061207) MIME-Version: 1.0 To: Andi Gutmans CC: internals@lists.php.net References: <011701c7482d$a39f6910$6500a8c0@zend.2k> In-Reply-To: <011701c7482d$a39f6910$6500a8c0@zend.2k> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at gna.ch Subject: Re: Syntactic improvement to array From: cschneid@cschneid.com (Christian Schneider) Andi Gutmans wrote: > So what I'm thinking of is: > array(1, 2, 3) == [1, 2, 3] I like this syntax, more conscise but still clear (and well established in other languages by now). Two more thoughts (but please don't kill Andi's proposal because of it, rather dismiss my comments instead ;-)): - [$a, $b, $c] = ... equivalent to list($a, $b, $c) = ... - func('foo' => $foo, 'bar' => $bar, ...) equivalent to func(array('foo' => $foo, 'bar' => $bar, ...), see http://cschneid.com/php/ for more info Regards, - Chris