I just don't get why, of all the OO systems out there to inspire an engineer, the PHP people picked Java.
Who knows, perhaps it's one of the biggest reasons they're so successful, however much we who know better dislike that.
41–50 of 53 posts
I just don't get why, of all the OO systems out there to inspire an engineer, the PHP people picked Java.
Who knows, perhaps it's one of the biggest reasons they're so successful, however much we who know better dislike that.
Earlier quoted context omitted.
PHPs design and grammar precluded using any of the other existing operators. The backslash is really the best choice and in practice it works pretty well. The actual debate on the separator choice was very very very long.
Yeah, and also: Who gives a shit? It's the convention they chose, just adapt to it and get over it, or program in a different language. People who like to complain about PHP are rarely the same people who use it every day.
Earlier quoted context omitted.
Yeah, and also: Who gives a shit? It's the convention they chose, just adapt to it and get over it, or program in a different language. People who like to complain about PHP are rarely the same people who use it every day.
I have to use PHP every day and I rarely go a day without complaining about it.
I mostly hear C/C++, Ruby, Python, etc. devs complain about PHP. Very rarely actual PHP developers.
And typically, their complaints are less of the moan-ass "waaah, they use a \ for namespace separation" and more "ugh, why don't they disabled emulated prepared statements by default"?
Only one side is constructive.
Earlier quoted context omitted.
Rationale was discussed on IRC, see: https://wiki.php.net/_media/rfc/php.ns.txt Linked to at the bottom of: https://wiki.php.net/rfc/namespaceseparator
I skimmed through it but couldn't really understand why they couldn't coopt one of the existing operators (for example, by making classes have a namespace for their methods) Couldn't they provide a clearer explanation than simply dumping a huge IRC log like that??
Earlier quoted context omitted.
PHP is much more of a static language than a dynamic one. Therefore it has more in common with Java/C++ than with Python, Ruby, or JavaScript. It's also a very pragmatic choice for an OO system.
You could say that PHP == "static language", even if you maybe can't say PHP === "static language"?
Earlier quoted context omitted.
Heh, I was wondering the same. As others have pointed out, it looks like it's the namespace separator. Now someone has to explain why on Earth you need the namespace separator if these class names are already in the namespace? PHP has an incredible knack for almost copying other languages' features, but making them uglier in some random way, for no particular added benefit. (I know, I'm a hater... but seriously, why?…
The namespace separator is not required if already in the correct scope. I am not sure why the author decided to include them in the examples.
Earlier quoted context omitted.
I have to use PHP every day and I rarely go a day without complaining about it.
You're the exception, not the rule. I mostly hear C/C++, Ruby, Python, etc. devs complain about PHP. Very rarely actual PHP developers. And typically, their complaints are less of the moan-ass "waaah, they use a \ for namespace separation" and more "ugh, why don't they disabled emulated prepared statements by default"? Only one side is constructive.
Earlier quoted context omitted.
PHPs design and grammar precluded using any of the other existing operators. The backslash is really the best choice and in practice it works pretty well. The actual debate on the separator choice was very very very long.
Yeah, and also: Who gives a shit? It's the convention they chose, just adapt to it and get over it, or program in a different language. People who like to complain about PHP are rarely the same people who use it every day.
Amusingly, after months of pointless bikeshedding, we managed to convince the internals team to throw an exception during the extreme case of a CSPRNG failure. https://www.sammyk.me/security-changes-to-the-php-7-csprng-i... You can read my arguments on the mailing list, but basically it amounted to: $chars = 'abcdefghijklmnopqrstuvwxyz234567'; for ($i = 0; $i If random_int() returned FALSE, $password would be the str…
If you're going to break BC, might as well do it right.
Amusingly, after months of pointless bikeshedding, we managed to convince the internals team to throw an exception during the extreme case of a CSPRNG failure. https://www.sammyk.me/security-changes-to-the-php-7-csprng-i... You can read my arguments on the mailing list, but basically it amounted to: $chars = 'abcdefghijklmnopqrstuvwxyz234567'; for ($i = 0; $i If random_int() returned FALSE, $password would be the str…
We need more BC breaks, not fewer. I'd really like to see a lot of functions that return FALSE on failure throw exceptions in the future. We could also tidy up the stdlib a bit and give primatives some OO love. If you're going to break BC, might as well do it right.