Re: Re: Syntactic improvement to array
| From: | ivailo91 at gmail dot com | Date: | Mon, 05 Feb 2007 11:00:57 +0000 |
| Subject: | Re: Re: Syntactic improvement to array | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-27801@lists.php.net to get a copy of this message | ||
That would be very handy. As I code frequently JavaScript and ActionScript, I will use this feature
with pleasure. +2 for me :D The array(), especially for more-than-1 dimensional arrays is very
cumbersome.
Best Regards,
Ivailo Karamanolev
On Monday, February 5, 2007, 12:53:44 PM, LAUPRETRE François<francois.laupretre@ratp.fr>
wrote:
>> From: Christian Schneider [mailto:cschneid@cschneid.com]
>> What's also beautiful about [] IMHO is the symmetry of the syntax,
>> list() and array() are asymmetrical which I always found inferior.
> Agree. +1 for me, especially for this reason, even after reading Greg's examples :) IMO,
> it is
> more important to provide an elegant alternative to list() than a new syntax for array().
>>
>> >> - func('foo' => $foo, 'bar' => $bar, ...) equivalent
>> >> to
>> >> func(array('foo' => $foo, 'bar' => $bar, ...)
> Argh! Reading such a line, I think of named parameters, not an array. Ugly, confusing. -1 for
> me. Definitely.
> May I add that, as I regularly write multi-layer arrays as SOAP return values, I personnaly
> like this proposed syntax.
> Francois
>