3 ms·
I would argue that effectively having roughly 3,000 keywords is a problem of the language itself. And, saying, "PHP is not any worse or better than any other l
by SwellJoe 17y ago
I would argue that effectively having roughly 3,000 keywords is a problem of the language itself.
And, saying, "PHP is not any worse or better than any other language" is saying that all languages are equal. Which, having worked in a number of languages over the years, including PHP, I know to be false. PHP is worse than many languages, and better than many for some classes of problem. It's just silly to say that all languages are equal.
- ars 17y agoPHP does not have 3000 keywords. It has an ordinary number, and the rest are functions - basically the standard library. You are confusing the language and the library. And for that matter the library is not bad either, it does however have a few poorly named legacy functions. > It's just silly to say that all languages are equal. Sorry, I wasn't really trying to say that. I meant "loosely typed procedural languages" not "any other language". You pick the language the matches what you are doing, there is nothing inherent about PHP that makes it bad.
- SwellJoe 17y agoPHP does not have 3000 keywords. It has an ordinary number, and the rest are functions - basically the standard library. A library function that is not optional is effectively a keyword. The PHP standard library (all ~3000 functions) is not optional, as far as I know.
- nir 17y agoMany (most?) of them are optional, you can compile PHP with/without certain extensions. Design wise, it seems insane - kind of like the iPhone's non-removable battery. Turns out it doesn't hurt either one's popularity though...
- SwellJoe 17y agoOK, so I really didn't think I needed to specify "at run-time" with regard to the meaning of "optional".
- ars 17y agoThey can be done at runtime, you can dl() whatever modules you want. However no one bothers. Why? Because while having lots of keywords is a problem in theory, in the real world it doesn't matter at all.
- noodle 17y agoi think the point that was trying to be made is that PHP has its uses. use it where it best fits to solve the problem. just like any other language.