Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53055 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29817 invoked from network); 6 Jun 2011 17:10:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2011 17:10:10 -0000 Authentication-Results: pb1.pair.com header.from=sean@seancoates.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sean@seancoates.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain seancoates.com from 64.15.79.181 cause and error) X-PHP-List-Original-Sender: sean@seancoates.com X-Host-Fingerprint: 64.15.79.181 iconoclast.caedmon.net Received: from [64.15.79.181] ([64.15.79.181:58864] helo=iconoclast.caedmon.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/C6-23189-1F90DED4 for ; Mon, 06 Jun 2011 13:10:10 -0400 Received: from localhost (localhost [127.0.0.1]) by iconoclast.caedmon.net (Postfix) with ESMTP id C8918784052; Mon, 6 Jun 2011 13:11:12 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at iconoclast.caedmon.net Received: from iconoclast.caedmon.net ([127.0.0.1]) by localhost (iconoclast.caedmon.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5afjuBGrTGW4; Mon, 6 Jun 2011 13:11:10 -0400 (EDT) Received: from [10.0.1.13] (cpe-72-227-135-34.nyc.res.rr.com [72.227.135.34]) by iconoclast.caedmon.net (Postfix) with ESMTPSA id 83200784051; Mon, 6 Jun 2011 13:11:10 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii In-Reply-To: Date: Mon, 6 Jun 2011 13:10:04 -0400 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <9C6264DC-C61A-486B-ABB6-C476C3F5B085@seancoates.com> References: <084D2F1E-87E7-44CF-B8B6-47A250AD928D@seancoates.com> To: Pierre Joye X-Mailer: Apple Mail (2.1084) Subject: Re: [PHP-DEV] Object and Array Literals From: sean@seancoates.com (Sean Coates) > Please add the RFC header so we know what's the status. Thanks for catching this. >> $a =3D ['one': 1, 'two': 2, 'three': 'three']; >=20 > has anyone played with the parser to > implement it? I have not, personally. I feel like it would be a waste of time at this = point, unless a logical problem can be identified. > Also the : syntax was not the preferred one either in > the short syntax RFC. This RFC is a superset of the short array syntax RFC, in my opinion. > About the anonymous objects, the usage of stdclass is rare, at least > for the ones I met or use. We use it a lot. This grep is from the root of the Gimme Bar code (my = work project): $ grep -ir 'StdClass' * | wc -l 229 > A last comment for the record here, this whole JSON-like syntax sounds > wrong to me from the beginning. JSON does not aim to be written or > read by human being. It is about exchanging data between two ends. I > don't think using it as a base for a syntax in a language is a good > thing to do. You've just stated that you don't use this sort of thing very often = (which is fine, but users who don't use this very often are not my = intended target audience for this RFC). In my experience, users who DO interact with systems that speak JSON (or = a JSON-like syntax) find this very useful, and have been wanting it for = a long time. I have anecdotal evidence of this, but I could draw up = something more concrete if that's what is required to get this to pass. S