Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53005 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3326 invoked from network); 6 Jun 2011 09:10:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2011 09:10:01 -0000 Authentication-Results: pb1.pair.com header.from=dukeofgaming@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=dukeofgaming@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: dukeofgaming@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:33939] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/23-13071-7699CED4 for ; Mon, 06 Jun 2011 05:10:00 -0400 Received: by yxn35 with SMTP id 35so1422119yxn.29 for ; Mon, 06 Jun 2011 02:09: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:from:date :message-id:subject:to:cc:content-type; bh=q0HTynorizVqnr50stLkVeNuiyS6eYzxi+OPi/Rjbhc=; b=IIpRhAdPt8ViZfFvrHI4OaPv+Ts2j/MgsliDTPcZ6zle0r/N3P13xvLl0QZ8iUdm5I aJn1AzDJg1ALrB46W9qxZCIXeZqw9JDhX5HUpjcQHGbZQs7lQrKa+qdZpJILQXg1sC+H MHxYENbvNfUL+QbDyyiU1PEIkwtX+uXTYilhI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=D+0CmUHUFeTPNeul+1wzzyNtM0nmQ0P4eFYoS6kjVAmG6O+/cNxG3vCUsi1m6OBTIf dQApzO8q444J2ukvHlEM4ZMn8xU/YlPASAImTJpxmoEiI3QZU40g2CVC5QpwDX768xJE 2+qsWrtJkQlFhamTTqo7X3hpyx7pKLqn1T89o= Received: by 10.101.190.12 with SMTP id s12mr3355197anp.146.1307351396086; Mon, 06 Jun 2011 02:09:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.96.15 with HTTP; Mon, 6 Jun 2011 02:09:36 -0700 (PDT) In-Reply-To: <4DEC768B.6060902@lsces.co.uk> References: <073E2169-A50B-4139-851D-F62CF30189F4@bitextender.com> <4DEC768B.6060902@lsces.co.uk> Date: Mon, 6 Jun 2011 04:09:36 -0500 Message-ID: To: Lester Caine Cc: PHP internals Content-Type: multipart/alternative; boundary=0016367ed58e8f75b704a5077771 Subject: Re: [PHP-DEV] JSON array/object syntax From: dukeofgaming@gmail.com (dukeofgaming) --0016367ed58e8f75b704a5077771 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Jun 6, 2011 at 1:41 AM, Lester Caine wrote: > dukeofgaming wrote: > >> Ok, I found that Ruby added support for a new JSONy syntax a little while >> ago, this is interesting: >> >> http://webonrails.com/2009/02/06/ruby-191-hash/ >> >> But it doesn't have anything to do with JSON interoperability. >> > > I'd rather no have to learn ruby either, but a scan of that document would > seem to indicate that THEIR problem that was fixed was one of the way things > were incorrectly ordered after using 'associate'. I'm seeing '=>' as the > 'associate' which makes perfect sense there, when they use ':' to indicate > variables. > > Add the warnings that "This only works if the key is a symbol." and one > sees the sort of confusing mess that hopefully we are trying to avoid in > PHP. > > I'm just trying to point out that the ubiquity of the general syntax looks like a good thing. Also, that JSON has nothing to do with the syntax because the syntax makes sense by itself since it has proved to be expressive enough to become respected in various communities. But the JSONy argument should be dropped asap if this proposal is to be taken seriously. I'm not saying PHP should copy Ruby's rules, please don't imply that. Regards, David --0016367ed58e8f75b704a5077771--