Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52579 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90497 invoked from network); 31 May 2011 21:16:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 May 2011 21:16:47 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.160.42 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.160.42 mail-pw0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:40744] helo=mail-pw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/FB-25701-CBA55ED4 for ; Tue, 31 May 2011 17:16:47 -0400 Received: by pwj3 with SMTP id 3so2417092pwj.29 for ; Tue, 31 May 2011 14:16:41 -0700 (PDT) Received: by 10.142.154.13 with SMTP id b13mr1027662wfe.161.1306876601478; Tue, 31 May 2011 14:16:41 -0700 (PDT) Received: from [192.168.200.149] (c-76-126-236-132.hsd1.ca.comcast.net [76.126.236.132]) by mx.google.com with ESMTPS id x8sm228118wfx.19.2011.05.31.14.16.39 (version=SSLv3 cipher=OTHER); Tue, 31 May 2011 14:16:40 -0700 (PDT) Message-ID: <4DE55AB7.9050206@lerdorf.com> Date: Tue, 31 May 2011 14:16:39 -0700 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: Sean Coates CC: PHP internals References: <4DE5368A.6050603@moonspot.net> <2BFFEAC1-395E-4101-9452-002E63DCFD91@seancoates.com> In-Reply-To: <2BFFEAC1-395E-4101-9452-002E63DCFD91@seancoates.com> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) From: rasmus@lerdorf.com (Rasmus) On 05/31/2011 11:52 AM, Sean Coates wrote: > I'm one of the people who've brought it up on Twitter. Today's discussion seems to have earned some traction, which is a step in the right direction, I believe. > >> I would prefer (as Rasmus pointed out) not to start a long discussion about it. Primarily I would be curious if anyone on the lists (from the RFC wiki page) below would like to change your vote or if you are not listed below and would like to be counted, that would be great too. > > At risk of turning this into a longer-than-necessary discussion, I believe a new RFC is required at this point. Making [ and ] work as (T_ARRAY, '(') and (')'), respectively is no longer good enough, for the main reason you've pointed out: JSON is becoming ubiquitous; actual first-class JSON would be very valuable to me. The tricky part with going all json is the syntax, specifically the {}'s But I think it is doable, mostly because this is not valid today: $a = true ? { 1 : 2 }; And in json if you have {}'s you have to have a ':' inside. I have always preferred to "borrow" a familiar syntax from other languages that the average PHP user is comfortable with instead of making up a new one. Stas, I didn't understand your point about eval() and security. What did you mean? -Rasmus