Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52645 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51048 invoked from network); 1 Jun 2011 09:51:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2011 09:51:07 -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:44330] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/62-35539-98B06ED4 for ; Wed, 01 Jun 2011 05:51:06 -0400 Received: by yxi11 with SMTP id 11so2497880yxi.29 for ; Wed, 01 Jun 2011 02:51:03 -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=dD/3UR49IVQ/46GSQAK8BKBf9EXJbNHgCCkh1MuzSaU=; b=SlnZcV9GKQyOtaHAUpZwDM+vjneTdB/8GsFesc9tPCIxe5GX+R4HhwOB/cT3+geRMv Z0M5MwjhOwCcHUcKMxewWBgEn4+de+DJIuqv6R0VrEPCfKmtVPXoRlQQcq/yA5SFTgvd j0VDK6uYoZUw/HQiy+zxkBuFh/6Ugj7oZNAm8= 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=sJpne4iPlzFMO9auAMozlsFXNOOOvJaJL5+Z/wAxYF+SlbFVQcRiK4jRCDTS4AMs61 ibd48wxHYKSX5O4OV0tZ3c9h26qVjkW8VCEcNIJlTh73WVwK+UVwV0xBP//xw+BWT7xJ XcYhanGCUvAmiXxAi8wu/X24p7O3hLhvJ5fWk= Received: by 10.101.143.1 with SMTP id v1mr4555275ann.21.1306921863107; Wed, 01 Jun 2011 02:51:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.96.15 with HTTP; Wed, 1 Jun 2011 02:50:43 -0700 (PDT) In-Reply-To: <3158105795AAC1408619EC8BA03384A90A2D1C@EXC-MBX02.leedsmet.ac.uk> References: <3158105795AAC1408619EC8BA03384A90A2D1C@EXC-MBX02.leedsmet.ac.uk> Date: Wed, 1 Jun 2011 04:50:43 -0500 Message-ID: To: "Ford, Mike" Cc: Etienne Kneuss , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=0016e68deb776653e204a4a3759d Subject: Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux) From: dukeofgaming@gmail.com (dukeofgaming) --0016e68deb776653e204a4a3759d Content-Type: text/plain; charset=ISO-8859-1 After that argument, I think I'm against ":" now too. +1 to "=>" Could "{ }" be implemented for objects too then?. Regards, David On Wed, Jun 1, 2011 at 4:36 AM, Ford, Mike wrote: > > -----Original Message----- > > From: ekneuss@gmail.com [mailto:ekneuss@gmail.com] On Behalf Of > > Etienne Kneuss > > Sent: 01 June 2011 01:57 > > To: internals@lists.php.net > > Subject: Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux) > > > > +1 for a short array syntax. > > > > But only if you keep it consistent, PHP has always been using => for > > key/val association, I don't see any reason to suddenly provide > > "key": > > "val", unless what you want is to confuse people. > > Hear, hear and hear, hear to that! > > ['a': 'b'] just feels completely un-PHP-like, and I'd be totally > against it. > > If the desire is to have a "native" JSON syntax so that you can eval() > imported JSON, then I'm completely anti that, too -- that's a case > where I'd far rather be explicit and use json_decode(). And since, no > matter how you slice it, you're never going to get a complete fit > between native PHP structures and JSON encoding, I don't believe you > should even try. > > I just can't see the problem with saying: PHP arrays (and maybe > objects?) look like *this*, and if you want to import/export them > from/to a JSON representation, there are functions to do it like > *this*. This seems to be the perfectly sensible approach of other > languages I've used recently (although my perl is somewhat out-of-date, > and my python even more out-of-daterer and minimal at that!). Even > ECMAScript is going down the route of explicit conversion with > JSON.parse() and JSON.stringify() in ECMAScript 5! > > All in all, still +1 for [1, 2=>2, 'a'=>'b'], and -several million (for > style) for any syntax involving colons. > > Cheers! > > Mike > -- > Mike Ford, > Electronic Information Developer, Libraries and Learning Innovation, > Leeds Metropolitan University, C507 City Campus, > Portland Way, LEEDS, LS1 3HE, United Kingdom > E: m.ford@leedsmet.ac.uk T: +44 113 812 4730 > > > > > > > To view the terms under which this email is distributed, please go to > http://disclaimer.leedsmet.ac.uk/email.htm > --0016e68deb776653e204a4a3759d--