Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52737 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47862 invoked from network); 2 Jun 2011 07:58:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jun 2011 07:58:01 -0000 Authentication-Results: pb1.pair.com header.from=eloybote@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=eloybote@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: eloybote@gmail.com X-Host-Fingerprint: 209.85.210.42 mail-pz0-f42.google.com Received: from [209.85.210.42] ([209.85.210.42:33784] helo=mail-pz0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 86/A0-42934-78247ED4 for ; Thu, 02 Jun 2011 03:58:00 -0400 Received: by pzk37 with SMTP id 37so301633pzk.29 for ; Thu, 02 Jun 2011 00:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=TgdSPF01gTXS3sZmJApcUXswYfCD3eE+IdJ8I4PfTnI=; b=u/84yKAGi7NT8ZElPKBKx6MBHrj/zqXrIIRMEtOJ0cgiWEqPTnjdaZUsKfwDu9qHIw W8bnxPPiYsu/823wUWtxA2QIPOn1UHkxHnH5+WZil+rKb/SCti3Zw/bWCj+3GH9Fwatg 0ylgrZLJaOMAnCY+PdnPnINpFOm0lZdaDtPao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=CuH+AT7EFZXhJVFlq/cUE+LOh4SSefm1ZTl0PGsSfSHQtrYI2JZKRj/dkW/x9a+kAT lbsXZV0A+v6XHkpLkE0uP6Q+Yf0Z38j9cAN/M6TTO5ZlRiesG98Gk5tFTdkgS9+A/EMr gSiLtXs7V5Mw10cuGJ+jyqiHkMgvwtShao1SA= MIME-Version: 1.0 Received: by 10.143.26.8 with SMTP id d8mr60115wfj.343.1307001476138; Thu, 02 Jun 2011 00:57:56 -0700 (PDT) Received: by 10.142.223.12 with HTTP; Thu, 2 Jun 2011 00:57:56 -0700 (PDT) In-Reply-To: <68339132.20110602001939@cypressintegrated.com> References: <4DE5368A.6050603@moonspot.net> <8BEEEE49-8DA3-4634-BF9C-120F7A15B613@roshambo.org> <68339132.20110602001939@cypressintegrated.com> Date: Thu, 2 Jun 2011 09:57:56 +0200 Message-ID: To: Sanford Whiteman Cc: John Crenshaw , PHP internals Content-Type: multipart/alternative; boundary=001636e0ae0fb4c80604a4b5fe0d Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) From: eloybote@gmail.com (Eloy Bote Falcon) --001636e0ae0fb4c80604a4b5fe0d Content-Type: text/plain; charset=ISO-8859-1 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 => 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 thing. I don't care if it a) saves me houndred of kaystrokes in the definition of arrays, or if b) it's more familiar with _put_your_favorite_syntax_here_ because: a) I prefer the simple way of _this_ is done _this_ way against _this_ is done _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 it in the core, because another one will appear in the future and then we will be in the same point, stacking stuff forever or talking about deprecating 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. --001636e0ae0fb4c80604a4b5fe0d--