On 2011-06-01, Michael Shadle <mike...@gmail.com> wrote:
> On Wed, Jun 1, 2011 at 3:09 PM, Sean Coates <s...@seancoates.com> wrote:
>
>> This is not about saving five characters every time I type array(),
>> it's about making my systems all work together in a way that's a
>> little less abstracted, and a lot less prone to error.
>
> Why not make your data in JSON and then $foo = json_encode($data) ?
>
> Why try to adopt JSON to PHP, just so it matches another language's
> format?
>
> You do realize adding JavaScript syntax for arrays will only make that
> consistent with JavaScript, otherwise you're still coding PHP with PHP
> syntax, functions, etc. for everything else. That argument seems moot.
> If you're more comfortable with JavaScript, start developing in node
> if that is your cup of tea.

JavaScript is not the only target here. Many, many APIs are utilizing
JSON either internally or as the mechanism for communication with other
systems. 

Additionally, have you worked with complex data structures, and
attempted to de/serialize to/from PHP? ext/json does fairly well, but
there are many places where it fails, and many gotchas to consider to
ensure things are serialized correctly.

-- 
Matthew Weier O'Phinney
Project Lead            | matt...@zend.com
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to