+1 firstly, square brackets are natural short cut to array(...) that you can find in many many language, one may argue this is merely a minor addition. however, PHP is already a very verbose compare to other language, syntactic improvements adds up it allows us to create much more readable code.
someone raise up the readability issue of nested array, this is not a language issue, but rather programming style issue. its up to you to make it clean or verbose as you want it to be. yes, associative array may can look awkward. [] is just a short cut, there is nothing stopping you mix and match. $lists = array( 'first' => [ 1, 2 ,3, 4 ] , 'second' => [ 45, 33, 19 ] ); Lastly, one may again argue this will introduce extra workload for tester, commiter, patchers. This is a new addition to the language, there is no Backward compatibility issue. This isn't a technical issue, but rather management issue. PHP On the language design level hasn't been making much progress, PHP needs to move forward. proper closure, GC, and this. On Jan 20, 2008 2:26 PM, Darius Jahandarie <[EMAIL PROTECTED]> wrote: > Antony Dovgal wrote: > > On 10.01.2008 13:07, Ryusuke SEKIYAMA wrote: > >> Hello, lists, > >> > >> I'm tired to type "array()" many times. > > > > -1 > > > > The parser in my head is unable to parse this: > > <?php > > $var=["str"]; > > $var["str"]=1; > > ?> > > > > Eh, that would just come out as > [ 0 => "str", > "str" => 1 ] > > Not too problematic in my mind. > +1 for square brackets. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Best Regards, Taylor luk