Re: Re: RFC: Short syntax for Arrays (redux)
| From: | Etienne Kneuss | Date: | Wed, 01 Jun 2011 00:57:11 +0000 |
| Subject: | Re: Re: RFC: Short syntax for Arrays (redux) | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-52617@lists.php.net to get a copy of this message | ||
+1 for a short array syntax.
But only if you keep it consistent, PHP has always been using => for
key/val association, I don't see any reason to suddenly provide "key":
"val", unless what you want is to confuse people.
On Wed, Jun 1, 2011 at 02:42, dukeofgaming <dukeofgaming@gmail.com> wrote:
> On Tue, May 31, 2011 at 7:29 PM, Dan Birken <birken@gmail.com> wrote:
>
>> +1
>>
>> To be honest, ['a': 'b'] or ['a' => 'b'] is so
>> much better than array('a'
>> =>
>> 'b') for general use I don't even care which one is picked, as long as one
>> of them is picked.
>>
>> -Dan
>>
>
> +1 to that too. Even when I've never liked that much "=>" and would love to
> see ":" make an entrance instead .
>
> I'm afraid that if ":" is associated with the JSON interop argument and the
> later is discarded then ":" will be discarded too, much like what happened
> with the echo shortcut ("<?=") and the short tags ("<?"). Perhaps the
> idea
> of JSON interop could be taken to another RFC and get less noise and better
> ideas as a separate topic.
>
> Regards,
>
> David
>
--
Etienne Kneuss
http://www.colder.ch