Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52997 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67347 invoked from network); 6 Jun 2011 03:49:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2011 03:49:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=andrei@zmievski.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=andrei@zmievski.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zmievski.org from 209.85.161.42 cause and error) X-PHP-List-Original-Sender: andrei@zmievski.org X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:57863] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CA/4F-26000-43E4CED4 for ; Sun, 05 Jun 2011 23:49:09 -0400 Received: by fxm1 with SMTP id 1so2489826fxm.29 for ; Sun, 05 Jun 2011 20:49:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.17.68 with SMTP id r4mr405245faa.62.1307332145351; Sun, 05 Jun 2011 20:49:05 -0700 (PDT) Received: by 10.223.74.138 with HTTP; Sun, 5 Jun 2011 20:49:04 -0700 (PDT) X-Originating-IP: [98.234.88.127] In-Reply-To: <4723EA79-957B-4E03-85D1-F2F0E6DA29FA@bitextender.com> References: <4DE5368A.6050603@moonspot.net> <8BEEEE49-8DA3-4634-BF9C-120F7A15B613@roshambo.org> <4C39B728-2283-49A7-87F5-B0CC9EC42505@bitextender.com> <4723EA79-957B-4E03-85D1-F2F0E6DA29FA@bitextender.com> Date: Sun, 5 Jun 2011 20:49:04 -0700 Message-ID: To: =?ISO-8859-1?Q?David_Z=FClke?= Cc: John Crenshaw , Martin Scotta , Sean Coates , Anthony Ferrara , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) From: andrei@zmievski.org (Andrei Zmievski) On Sat, Jun 4, 2011 at 4:52 AM, David Z=FClke wrote: > Yes, I know. Then why are you and others demanding that the resulting syn= tax be fully compatible with JSON so it could be parsed by other JSON parse= rs? That makes no sense at all. A file with just ["foo"] in it won't be int= erpreted by PHP; you need at least wrappers and a semicolon, and t= hen you can't just throw it at another JSON parser anymore. I never demanded that anything resembling this. I simply stepped into this thread because of the encoding argument that ensued. > There is absolutely no use case for this, but some people on this thread = seem to have some weird dream where they can somehow share code between lan= guages or whatever. Which they can't. Unless they want to start stripping o= r padding stuff and generating code. > > I was pointing out the encoding issue under the assumption that it someho= w *did* make sense, e.g. that you'd have a JSON compatible declaration some= where in a PHP file, extracted it with, say, a regex, and handed it to PHP'= s own JSON parser, which might then struggle depending on the encoding of t= he file. My impression was that people just wanted a JSON-like way to construct arrays and objects. Which does not require using a JSON parser, just the Zend parser. -Andrei