Re: RFC: Short syntax for Arrays (redux)
| From: | Pierre Joye | Date: | Wed, 01 Jun 2011 22:14:19 +0000 |
| Subject: | Re: RFC: Short syntax for Arrays (redux) | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-52713@lists.php.net to get a copy of this message | ||
On Wed, Jun 1, 2011 at 11:59 PM, John Crenshaw <johncrenshaw@priacta.com> wrote:
> Spot on. It has nothing to do with extra typing (and that sort of design is part of what ruined
> Ruby). My fingers move plenty fast and if extra characters make things more safe or more readable,
> I'll be the first to sign up.. In this case, however, the extra characters just make things
> messy.
> 1. The most readable format is pure JSON
> 2. The most familiar format is pure JSON (because these same developers are almost certainly
> already using it in their jQuery code)
> 3. The most compact format is pure JSON
> 4. The format most consistent with other languages is JSON
Not sure which other language you refer to but python, C, perl (using
() instead) uses a very similar format.
To me using json (a serializer format) in code sounds wrong, very
wrong, in the 1st place. What's the next step? Bson? Using JSON in the
code also won't save anyone from any kind of conversions errors from
or to JSON.
This RFC proposed two syntaxes, which can be later extended to object
as well if desired. I would stronlgy suggest to focus on this RFC and
get it sort out (accepted or rejected). If it requires to clarify the
RFC to make the voting easier, then let do it.
Cheers,
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org