Re: Object and Array Literals
| From: | Paul Dragoonis | Date: | Sun, 19 Jun 2011 03:05:21 +0000 |
| Subject: | Re: Object and Array Literals | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53371@lists.php.net to get a copy of this message | ||
On Sun, Jun 19, 2011 at 3:56 AM, Daniel Convissor
<danielc@analysisandsolutions.com> wrote:
> Hi:
>
> I wasn't keen on earlier proposals for the [] array syntax. Sean, your
> case is laid out in a clear manner and addresses my concerns. I like
> this RFC.
>
>
>> * Strictness of unquoted keys.
>
> Keys should be quoted. At the very least, unquoted keys should raise an
> E_NOTICE.
>
>
>> * Support => in addition to : as a key:value separator.
>
> I guess.
>
>
>> * possibility of simply not supporting the \u### syntax for Unicode
>> characters in literal strings (just like the rest of PHP).
>
> It'd be nice to have, but not essential.
>
>
>> * Should mixed-format (numeric and associative arrays) be allowed?
>> (e.g. [1,'two':2, 3])
>
> Yes, just like JSON (kind of) and PHP support.
I +1 the JSON syntax for keys on objects and arrays. Specifically I
mean quoting the keys, this will remove ambiguity if it was supposed
to use a constant or whatnot. String quoted keys++
>
> Thanks,
>
> --Dan
>
> --
> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
> data intensive web and database programming
> http://www.AnalysisAndSolutions.com/
> 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>