Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53023 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63991 invoked from network); 6 Jun 2011 13:59:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2011 13:59:43 -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:35701] helo=iconoclast.caedmon.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/F7-17923-E4DDCED4 for ; Mon, 06 Jun 2011 09:59:42 -0400 Received: from localhost (localhost [127.0.0.1]) by iconoclast.caedmon.net (Postfix) with ESMTP id 6619678404F; Mon, 6 Jun 2011 10:00:45 -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 lAROr0impGIg; Mon, 6 Jun 2011 10:00:43 -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 2E937784043; Mon, 6 Jun 2011 10:00:43 -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 09:59:37 -0400 Cc: Sanford Whiteman , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <1181529113.20110605190617@cypressintegrated.com> To: dukeofgaming X-Mailer: Apple Mail (2.1084) Subject: Re: [PHP-DEV] Object and Array Literals From: sean@seancoates.com (Sean Coates) > a) JSON is actually being mentioned to advocate for the syntax with = for the > sake of *familiarity*. > b) Interoperability is being confused with familiarity. My goal is interoperability. Familiarity is a factor, definitely. > c) Actual interoperability of the syntax with JSON is just a happy > coincidence (same as with Ruby) I disagree; see below. > d) In no context this notation could function as JSON and PHP at the = same > time, mainly because PHP requires tags I don't think they could be interchangeable, programmatically, as files, = but copying and pasting from PHP to curl for ElasticSearch would have = saved me hours of back-and-forth over the past months. > e) There is a strong resistance to change, I bet the detractors of = this > short syntax (even with the ":") would change their opinion after = using it, > just the way some of us used to hate the idea of namespaces with "\" = and > after using it changed our opinion (specially with the autoloading = standard > that actually reflects file structure, e.g. in Symfony2). Absolutely agree. In addition, for me to see the value in this, it took = more than just knowing how it worked, but immersing myself in this = syntax (really wanting it). When short array syntax was first proposed, I didn't care. As I've said = here a couple times, this is not about saving 5 characters by changing = "array(" into "[", but about many other things. > f) If JSON ceased to exist in this very moment, supporters of the = syntax > would be still supporting it and perhaps detractors would accept it. >=20 > The effect of mentioning JSON, and implying direct compatibility with = JSON > technologies and JSON itself is just adding FUD. I don't want blanket compatibility. I do want to be able to write PHP = that *CAN* be passed off to third-parties verbatim, if care is taken to = do so. Most of the time I use JSON, this care is not required, though. I = don't think it's FUD, but I do see your point in that the term "JSON" is = strangely offensive to some, and I would be willing to remove it (but = not if only you two think this way). > +1 to removing references to JSON from the RFC, because "[ ]", "{ }" = and ":" > make enough sense by themselves. S