Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52646 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52762 invoked from network); 1 Jun 2011 09:55:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2011 09:55:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=rumi.kg@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rumi.kg@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rumi.kg@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:63334] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D8/B2-35539-18C06ED4 for ; Wed, 01 Jun 2011 05:55:14 -0400 Received: by vwl1 with SMTP id 1so4398721vwl.29 for ; Wed, 01 Jun 2011 02:55:10 -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 :content-transfer-encoding; bh=NlyHUea8POyBXo2LLlQrFYxD0O+FNwLnTwPPqMt79Ns=; b=m9SV8mX9M5rfkyZ0P9I7OQCO4RvF3RwR46U9HqV+aKDbCm8HEDTPrTQp6F5800oF3o qRASH0t7YfnAbkQecDvKFslBwBR7aBxIv2AcnjBo/Eoyz5pmzkWLC+7ANHC4aRPL0vWC 7kM01DzQGNYfR6M+xdx6fvnCf3LPYYPfo95kM= 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:content-transfer-encoding; b=Cen3O0rQuvJz+UgDFDO3J3S4Uls5mMfp9wqi5/thEu/Z4PE/5szOupLXGg9fSjGGBW ML2gFjQZ2sCkFAaCF1bl5XKwgHC530cU1eohYUeDsZ+uYzksBGzewjoRCkGr4nXcVQma Zin8ovUjZkVo84pYqEb4Zw1Lk9Lu44vZ9S/LQ= MIME-Version: 1.0 Received: by 10.52.100.3 with SMTP id eu3mr1825261vdb.31.1306922110485; Wed, 01 Jun 2011 02:55:10 -0700 (PDT) Received: by 10.52.115.9 with HTTP; Wed, 1 Jun 2011 02:55:10 -0700 (PDT) In-Reply-To: References: <3158105795AAC1408619EC8BA03384A90A2D1C@EXC-MBX02.leedsmet.ac.uk> Date: Wed, 1 Jun 2011 11:55:10 +0200 Message-ID: To: dukeofgaming Cc: "Ford, Mike" , Etienne Kneuss , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux) From: rumi.kg@gmail.com (Rune Kaagaard) Big +1 on the patch. The ":" although a better choice would be asymmetric to how its done inside array(). On Wed, Jun 1, 2011 at 11:50 AM, dukeofgaming wrot= e: > After that argument, I think I'm against ":" now too. +1 to "=3D>" > > 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 =3D> 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=3D>2, 'a'=3D>'b'], and -several million (= for >> style) for any syntax involving colons. >> >> Cheers! >> >> Mike >> =A0-- >> Mike Ford, >> Electronic Information Developer, Libraries and Learning Innovation, >> Leeds Metropolitan University, C507 City Campus, >> Portland Way, LEEDS, =A0LS1 3HE, =A0United Kingdom >> E: m.ford@leedsmet.ac.uk =A0 =A0 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 >> >