Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52801 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2792 invoked from network); 2 Jun 2011 18:56:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jun 2011 18:56:38 -0000 Authentication-Results: pb1.pair.com header.from=johncrenshaw@priacta.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=johncrenshaw@priacta.com; spf=pass; 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:47116] helo=mx1.myoutlookonline.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/C3-11525-4ECD7ED4 for ; Thu, 02 Jun 2011 14:56:37 -0400 Received: from st21.mx1.myoutlookonline.com (localhost [127.0.0.1]) by mx1.myoutlookonline.com (Postfix) with ESMTP id 8090055387B; Thu, 2 Jun 2011 14:56:34 -0400 (EDT) X-Virus-Scanned: by SpamTitan at mail.lan Received: from HUB028.mail.lan (unknown [10.110.2.1]) by mx1.myoutlookonline.com (Postfix) with ESMTP id BBFE955354A; Thu, 2 Jun 2011 14:56:32 -0400 (EDT) Received: from MAILR001.mail.lan ([192.168.1.2]) by HUB028.mail.lan ([10.110.17.28]) with mapi; Thu, 2 Jun 2011 14:55:36 -0400 To: Eloy Bote Falcon , PHP internals Date: Thu, 2 Jun 2011 14:56:20 -0400 Thread-Topic: [PHP-DEV] RFC: Short syntax for Arrays (redux) Thread-Index: Acwg+qQgjvzby25JSxGCHZhSit7iSgAV8KiA Message-ID: References: <4DE5368A.6050603@moonspot.net> <8BEEEE49-8DA3-4634-BF9C-120F7A15B613@roshambo.org> <68339132.20110602001939@cypressintegrated.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_A633CF2D7C7BED41B41F1E64F25507B8060220A02AMAILR001maill_" MIME-Version: 1.0 Subject: RE: [PHP-DEV] RFC: Short syntax for Arrays (redux) From: johncrenshaw@priacta.com (John Crenshaw) --_000_A633CF2D7C7BED41B41F1E64F25507B8060220A02AMAILR001maill_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable There's no need to be rude. If you can't make your point without attacking = people, then you need a better argument. "JSON" in this case just means a simple object notation using {, [, and :. = You know that. Yes, we're all abusing the term, just like we all abuse "AJA= X", regardless of the fact that almost nobody ACTUALLY uses XML as the tran= sfer encoding. Who cares? "JSON" is the best word available. Unless you can= suggest a better word to differentiate this format from the others (one th= at isn't designed to insult anyone who disagrees with you) stop fussing abo= ut it. John Crenshaw Priacta, Inc. From: Eloy Bote Falcon [mailto:eloybote@gmail.com] Sent: Thursday, June 02, 2011 3:58 AM To: Sanford Whiteman Cc: John Crenshaw; PHP internals Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) 2011/6/2 Sanford Whiteman > > I don't think anyone cares about JSON for the sake of being perfect > JSON, I didn't intend to give that impression. Then you should stop saying "pure JSON" and "true JSON" constantly! > I'm only hoping for something that generally works on par with all > the other JSON parsers in the world. OK, that trashes your example, where values were set based on the result of a PHP function. There is no "par" for JSON parsers running methods _at creation time_, within the server (author) context. Setting vars to the return value of a function is something we take for granted in real languages, but it cannot happen within what a knowledgeable person would call "JSON." > Yes, JSON is a very specific encoding, but when a developer writes > something "jsony", what they mean is "an object/array with the > following structure/values", because that is what the encoding > really represents. Not Javascript developers. Maybe jQiddies think that {'$gt': strtotime('-1 day')} is "JSONy" more than it is "JS objecty"? This is like starting from "Wouldn't inline CSVs be great for creating arrays?" and drifting to "I mean, not like with that comma-escaping stuff, and, uh, newlines would be allowed in the middle of a record, and you'd have to allow create-time interpolation of function calls. You know, CSVy!" Only thing I might generously refer to as being "JSONy," while provably not being valid JSON, is a string that conforms in every way _except_ for using single quotes -- everywhere that doubles are required -- instead of using doubles. Anything else is someone's mangled "JankySON" or just not JSON. -- S. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -1 to the RFC. +1 to =3D> against : if the array short syntax it's finally implemented. I, being a lazy programmer, don't want anymore new syntax to do the same th= ing. I don't care if it a) saves me houndred of kaystrokes in the definitio= n of arrays, or if b) it's more familiar with _put_your_favorite_syntax_her= e_ because: a) I prefer the simple way of _this_ is done _this_ way against _this_ is d= one _this_ way or _this_another_ way or _this_yet_another_ way. b) When another new fancy tendency of encoding appear I don't want to see i= t in the core, because another one will appear in the future and then we wi= ll be in the same point, stacking stuff forever or talking about deprecatin= g the old and breaking BC. My point is: I'm for implementing something that can't be done currently in= PHP, but against for implementing another way of doing the same. --_000_A633CF2D7C7BED41B41F1E64F25507B8060220A02AMAILR001maill_--