Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52599 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18270 invoked from network); 31 May 2011 22:03:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 May 2011 22:03:41 -0000 Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain prohost.org designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:46531] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/E1-25701-CB565ED4 for ; Tue, 31 May 2011 18:03:41 -0400 Received: by bwz18 with SMTP id 18so4498498bwz.29 for ; Tue, 31 May 2011 15:03:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.46.161 with SMTP id j33mr5917706bkf.212.1306879417588; Tue, 31 May 2011 15:03:37 -0700 (PDT) Received: by 10.204.72.3 with HTTP; Tue, 31 May 2011 15:03:37 -0700 (PDT) In-Reply-To: <4DE564DB.5080302@lerdorf.com> References: <4DE5368A.6050603@moonspot.net> <2BFFEAC1-395E-4101-9452-002E63DCFD91@seancoates.com> <4DE55AB7.9050206@lerdorf.com> <4DE564DB.5080302@lerdorf.com> Date: Wed, 1 Jun 2011 00:03:37 +0200 Message-ID: To: Rasmus Cc: Sean Coates , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) From: ilia@prohost.org (Ilia Alshanetsky) On Tue, May 31, 2011 at 11:59 PM, Rasmus wrote: > On 05/31/2011 02:45 PM, Ilia Alshanetsky wrote: >> Rasmus, >> >> Don't you think having support for both ['a':1, 'b':2] and {'a':1, >> 'b':2} would create confusion? > > Not if we present this as native json support in PHP. Then we have to > support the {} version. Other than a couple of grumpy old-timers, I > think we are in agreement that we should add a short array syntax. > Whether we should extend that to also add a short object syntax is a > secondary question. I guess if you present it as a native json support in PHP, it probably would be ok from clarity standpoint. Overloading {} parser should be doable, but a little trickier than []. The + of the current patch is that it is very nice and simple.