Re: [PHP-DEV] JSON array/object syntax

2011-06-06 Thread Lester Caine
dukeofgaming wrote: I'm not saying PHP should copy Ruby's rules, please don't imply that. Sorry - all I was trying to point out that even Ruby seems to be as inconsistent as everywhere else in this area. Personally I don't like the idea of add 'yet another' way of doing things. => is a consist

Re: [PHP-DEV] JSON array/object syntax

2011-06-06 Thread dukeofgaming
On Mon, Jun 6, 2011 at 1:41 AM, Lester Caine wrote: > dukeofgaming wrote: > >> Ok, I found that Ruby added support for a new JSONy syntax a little while >> ago, this is interesting: >> >> http://webonrails.com/2009/02/06/ruby-191-hash/ >> >> But it doesn't have anything to do with JSON interopera

Re: [PHP-DEV] JSON array/object syntax

2011-06-05 Thread Lester Caine
dukeofgaming wrote: Ok, I found that Ruby added support for a new JSONy syntax a little while ago, this is interesting: http://webonrails.com/2009/02/06/ruby-191-hash/ But it doesn't have anything to do with JSON interoperability. I'd rather no have to learn ruby either, but a scan of that do

Re: [PHP-DEV] JSON array/object syntax

2011-06-05 Thread dukeofgaming
Ok, I found that Ruby added support for a new JSONy syntax a little while ago, this is interesting: http://www.strictlyuntyped.com/2010/12/new-ruby-19-hash-syntax.html http://webonrails.com/2009/02/06/ruby-191-hash/ But it doesn't have anything to do with JSON interoperability. On Sat, Jun 4, 20

Re: [PHP-DEV] JSON array/object syntax

2011-06-04 Thread Anthony Ferrara
One advantage would be familiarity. New developers only need to worry about 1 syntax, rather than a new one for each language. I'm not saying if it's worth it or not, but there is something to be said for consistency and using already established patterns and syntaxes if it makes sense (aka: ther

Re: [PHP-DEV] JSON array/object syntax

2011-06-04 Thread Philip Olson
Greetings, It'd be beneficial if we waited to discuss this topic until after Sean proposes an RFC this weekend. Regards, Philip -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] JSON array/object syntax

2011-06-04 Thread David Zülke
To clarify: I don't understand what the advantage would be, either. It seems that those demanding it somehow confuse or blur the lines between the declaration of data in the language and its representation in a serialization format. A few people in the thread demanded that it be a syntax that co

[PHP-DEV] JSON array/object syntax

2011-06-03 Thread dukeofgaming
Hi, After reading all the debate in the other thread it is still not clear to me what the real advantages are of adopting JSON syntax for native PHP types. Doing json_encode to an object and expect the code and output to be the same seems useless to me, and reading David Zülke's example it seems m