Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27749 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6222 invoked by uid 1010); 4 Feb 2007 17:27:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 6206 invoked from network); 4 Feb 2007 17:27:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2007 17:27:42 -0000 Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 64.233.162.238 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 64.233.162.238 nz-out-0506.google.com Linux 2.4/2.6 Received: from [64.233.162.238] ([64.233.162.238:11637] helo=nz-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/82-18726-D8716C54 for ; Sun, 04 Feb 2007 12:27:42 -0500 Received: by nz-out-0506.google.com with SMTP id k1so1460030nzf for ; Sun, 04 Feb 2007 09:27:39 -0800 (PST) Received: by 10.65.194.13 with SMTP id w13mr9374468qbp.1170610059345; Sun, 04 Feb 2007 09:27:39 -0800 (PST) Received: from ?192.168.1.6? ( [74.108.69.82]) by mx.google.com with ESMTP id e13sm9759754qbe.2007.02.04.09.27.38; Sun, 04 Feb 2007 09:27:38 -0800 (PST) In-Reply-To: <011701c7482d$a39f6910$6500a8c0@zend.2k> References: <011701c7482d$a39f6910$6500a8c0@zend.2k> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <021D0D3A-10C1-4AA9-ABD2-303CB197C2FD@prohost.org> Cc: Content-Transfer-Encoding: 7bit Date: Sun, 4 Feb 2007 12:27:36 -0500 To: Andi Gutmans X-Mailer: Apple Mail (2.752.3) Subject: Re: [PHP-DEV] Syntactic improvement to array From: ilia@prohost.org (Ilia Alshanetsky) I have to second Marcus on this, this new syntax makes things harder to read. I mean what are you saving here, a few letter? Ilia On 4-Feb-07, at 2:25 AM, Andi Gutmans wrote: > Hi, > > I thought I may have brought this up a long time ago but couldn't > find anything in the archives. > For a long time already I've been thinking about possibly adding a > new syntax for array(...) which would be shorter. I'd suggest > [...]. While I am usually not in favor of having more than one way > to do things, I think it'd look much more elegant especially (but > not only) for nested arrays. > > So what I'm thinking of is: > array(1, 2, 3) == [1, 2, 3] > array(1, 2, array("foo", "bar")) == [1, 2, ["foo", "bar"]] > array("key" => 1, "key2" => 2) == ["key" => 1, "key2" => 2] > > $arr = [1, 2, 3] > vs. > $arr = array(1, 2, 3) > > Well enough examples given :) > I think it's not worth doing unless there's overwhelming support as > it's not desperately needed. But I'd be interested to hear > people's thoughts. It seems implementation shouldn't be an issue > but I'd have to dive a bit deeper. > > Andi > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > Ilia Alshanetsky