On Mon, Jun 6, 2011 at 1:41 AM, Lester Caine <les...@lsces.co.uk> 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 interoperability.
>>
>
> I'd rather no have to learn ruby either, but a scan of that document would
> seem to indicate that THEIR problem that was fixed was one of the way things
> were incorrectly ordered after using 'associate'. I'm seeing '=>' as the
> 'associate' which makes perfect sense there, when they use ':' to indicate
> variables.
>
> Add the warnings that "This only works if the key is a symbol." and one
> sees the sort of confusing mess that hopefully we are trying to avoid in
> PHP.
>
>
I'm just trying to point out that the ubiquity of the general syntax looks
like a good thing.

Also, that JSON has nothing to do with the syntax because the syntax makes
sense by itself since it has proved to be expressive enough to become
respected in various communities. But the JSONy argument should be dropped
asap if this proposal is to be taken seriously.

I'm not saying PHP should copy Ruby's rules, please don't imply that.

Regards,

David

Reply via email to