OK .. I'm a wobbler. I think it would be cool to have the cleaner alternative syntax; I think I'd use it *in some situations and not others*, and I think that that in itself would make my code virtually unmaintainable by anyone else.
As Andi originally said, having more than one way to do things isn't always a good thing. Add me to the -1 list. Even tho' it's a cool idea. - Steph > -----Original Message----- > From: Christian Schneider [mailto:[EMAIL PROTECTED] > Sent: 04 November 2003 23:33 > To: [EMAIL PROTECTED] > Subject: [PHP-DEV] Proposal: Array syntax > > > I propose to add an alternative (backward compatible) short array > creation syntax: > $a = [ 1, 2, 3 ]; and $a = [ 'a' => 42, 'b' => "foo" ]; > > It can also be used in function calls: > img(['src' => "logo.gif", 'alt' => "Logo"]); > > Reason behind this change: Arrays are used a lot and should therefore > have as little syntactic overhead as possible. And I think the short > syntax is also easier to read and write. > > A patch for the parser is trivial and is attached for Zend2. > > Note: I checked the newsgroup archive but couldn't find a discussion > about this. After not hearing back about my proposed enhancement to > debug_backtrace() and the dangling comma for function call parameters > being rejected I wonder if I'm using the right mailing list for this :-) > > - Chris > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php