Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52720 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48412 invoked from network); 1 Jun 2011 22:28:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2011 22:28:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=johncrenshaw@priacta.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=johncrenshaw@priacta.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain priacta.com designates 64.95.72.238 as permitted sender) X-PHP-List-Original-Sender: johncrenshaw@priacta.com X-Host-Fingerprint: 64.95.72.238 mx1.myoutlookonline.com Received: from [64.95.72.238] ([64.95.72.238:55295] helo=mx1.myoutlookonline.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/68-32367-A0DB6ED4 for ; Wed, 01 Jun 2011 18:28:27 -0400 Received: from st21.mx1.myoutlookonline.com (localhost [127.0.0.1]) by mx1.myoutlookonline.com (Postfix) with ESMTP id A449A552F4E for ; Wed, 1 Jun 2011 18:28:23 -0400 (EDT) X-Virus-Scanned: by SpamTitan at mail.lan Received: from HUB015.mail.lan (unknown [10.110.2.1]) by mx1.myoutlookonline.com (Postfix) with ESMTP id 21CC3552FCA for ; Wed, 1 Jun 2011 18:28:23 -0400 (EDT) Received: from MAILR001.mail.lan ([192.168.1.2]) by HUB015.mail.lan ([10.110.17.15]) with mapi; Wed, 1 Jun 2011 18:27:13 -0400 To: PHP internals Date: Wed, 1 Jun 2011 18:28:18 -0400 Thread-Topic: [PHP-DEV] RFC: Short syntax for Arrays (redux) Thread-Index: AcwgqKNN+zIm5jQwQ/yhQ7ovRjnxdwAAFxaA Message-ID: References: <4DE5368A.6050603@moonspot.net> <8BEEEE49-8DA3-4634-BF9C-120F7A15B613@roshambo.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: RE: [PHP-DEV] RFC: Short syntax for Arrays (redux) From: johncrenshaw@priacta.com (John Crenshaw) I'm suddenly realizing that the actual need is, in many cases, specific to = the development circumstances. When developing heavily against/with other s= ystems that use JSON (like MongoDB, jQuery, various APIs, etc.) the value o= f true JSON is immeasurable, and anything that isn't JSON would look wrong = in that code. On the other hand, something like ZendFramework may likely lo= ok better with something that is more internally consistent, (if it even us= es the shorter syntax at all) since the primary emphasis of the code is PHP= . What if both syntaxes are allowed (both pure JSON, and the PHP-like =3D> sy= ntax)? Individual projects could gravitate to the format that makes the mos= t sense on a case by case basis. John Crenshaw Priacta, Inc. -----Original Message----- From: Sean Coates [mailto:sean@seancoates.com]=20 Sent: Wednesday, June 01, 2011 6:09 PM To: Anthony Ferrara Cc: PHP internals Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) > Now, the only reason I would personally support the array shortcut is > if it was an implementation of JSON. I know that's not on the table > here I don't think anything is officially off the table, unless we forego discus= sion. My application is largely JSON-powered. We pass data from back- to front-en= d via JSON, we interact with MongoDB via the extension (which is an altered= JSON-like protocol (arrays instead of objects), but would be a lot more fl= uent with actual objects-they're just too hard to make in current PHP), and= we interface with ElasticSearch. The paste I linked earlier is our primary= ElasticSearch query. The benefits of first-class JSON are important and wide-reaching; especiall= y when interacting with systems like the ones I've mentioned. There's a hug= e amount of value in being able to copy JSON out of PHP and into e.g. CURL = to make a query to ElasticSearch without worrying that I've accidentally ne= sted one level too deep or shallow, or accidentally mistranslating my array= s into JSON. This is not about saving five characters every time I type array(), it's ab= out making my systems all work together in a way that's a little less abstr= acted, and a lot less prone to error. S --=20 PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php