Contra ... Not searchable through search engines That's a ridiculous argument.
PHP Short Syntax for Arrays: developers say no.
81–89 of 89 posts
Re: PHP Short Syntax for Arrays: developers say no.
#82Re: PHP Short Syntax for Arrays: developers say no.
#83The vote was in 2008. It's being brought up again for 5.4.
Re: PHP Short Syntax for Arrays: developers say no.
#84Earlier quoted context omitted.
You could write that if you wanted, using __call, would be like 10 lines of code or something.
Php arrays don't act as objects and have no methods, so I'm not sure what you are suggesting.
Re: PHP Short Syntax for Arrays: developers say no.
#85Earlier quoted context omitted.
No I meant "syntactic sugar" in a good way, i didnt realise it was a pejorative. I mean it as per the definition on wikipedia: Syntactic sugar is a computer science term that refers to syntax within a programming language that is designed to make things easier to read or to express, while alternative ways of expressing them exist.
It is not generally perjorative. Some people interpret it as automatically perjorative, feeling that any syntactic sugar must necessarily carry costs in excess of benefits, but they are in the minority. Sizable minority, but minority. Concentrations of people who dislike all syntax sugar can be found in the Forth community and concatenative languages in general, Lisp, and to a lesser extent, in the Haskell community.…
Re: PHP Short Syntax for Arrays: developers say no.
#86Re: PHP Short Syntax for Arrays: developers say no.
#87Contra ... Not searchable through search engines That's a ridiculous argument.
Not when you consider how a large number of PHP programmers "program" on a day-to-day basis.
On the second thought - if PHP would at last consider converting or storing everyhting as an object ("".length or [].walk()), this would cause a problem. Still, see my first sentence.
Re: PHP Short Syntax for Arrays: developers say no.
#88Re: PHP Short Syntax for Arrays: developers say no.
#89This 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.
It's like they don't even _want_ to fix the language.
Who decided that "" is better than "". I think one of their main arguments was that it could conflict with XML / XHTML parsers, but the people who want to parse php files using XHTML parsers are probably in the minority.