Earlier quoted context omitted.
It's kind of JSON-wish, so this would make more sense: $bar = [1, 2, 3]; $foo = { 'bar': TRUE, 'baz': 'socks' };
This is more perlish, with the exception of the map delimiter. If you proposed => it would be identical to perl.
PHP Short Syntax for Arrays: developers say no.
31–40 of 89 posts
Re: PHP Short Syntax for Arrays: developers say no.
#32It's a shame that PHP does not get better as a language, as from the point of view of deployment and "get things done now" is great.
Re: PHP Short Syntax for Arrays: developers say no.
#33Re: PHP Short Syntax for Arrays: developers say no.
#34Anyone else getting an untrusted SSL Cert error from the link?
Yep, but just remove the 's' from the protocol.
Re: PHP Short Syntax for Arrays: developers say no.
#35Re: PHP Short Syntax for Arrays: developers say no.
#36Why try to make PHP more readable? Just use another language. PHP, like C++, is a big industry dinosaur that can't and won't change. In my opinion, the best think you could do is create a new language which compiles to PHP. I.e. A coffeescript for PHP. You don't have to "vote" and get stupid arguments against; you don't have to be backward compatible; and you only have great programmers in that project since crappy o…
> coffeescript for PHP Make this happen please. I can't think of a more deserving language and it'd make my day job a lot nicer.
Re: PHP Short Syntax for Arrays: developers say no.
#37"Other than a couple of grumpy old-timers, I think we are in agreement that we should add a short array syntax. Whether we should extend that to also add a short object syntax is a secondary question." (http://news.php.net/php.internals/52597)
Re: PHP Short Syntax for Arrays: developers say no.
#38Contra ... Not searchable through search engines That's a ridiculous argument.
Re: PHP Short Syntax for Arrays: developers say no.
#39Re: PHP Short Syntax for Arrays: developers say no.
#40This does not seem reasonable. I mean that literally -- this feels more like a choice driven by culture than by reason. The cons seem nowhere near strong enough to counter the fact that the overwhelming majority of users want this syntax, and have been asking for it for years.