4 ms·
I just don't get why, of all the OO systems out there to inspire an engineer, the PHP people picked Java.
by oldmanjay 11y ago
I just don't get why, of all the OO systems out there to inspire an engineer, the PHP people picked Java.
- wvenable 11y agoPHP 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.
- vruiz 11y agoPHP wasn't always what it is now, that's OPs point. They are where they chose to go. Probably in the search of legitimacy, they chose to follow the most enterprisey language.
- Someone1234 11y agoBut you, like the OP, fail to communicate exactly WHY this is a bad thing. You just take it for granted that your point stands on its own without an explanation. Why NOT Java?
- oldmanjay 11y agoJava is a fairly ugly OO system, basically. It's purely my opinion, of course, but not an uncommon one. Since I don't have to use PHP I'm not too upset. I was really just lamenting the state of the world.
- durrrrrrr 11y agoSame thing as before, you've stated it's ugly, but haven't given any specific examples of why you think this.
- betenoire 11y agodo we really need to see bad java examples to understand his opinion?
- smt88 11y agoJust because a language is used to write bad code doesn't mean the language design itself is bad.
- KennyCason 11y agoExactly. I've seen beautifully written Java and I've seen (and written) ugly Java. The language syntax is by far the least contributing factor to the 'prettiness' of the code. With the exception of BF. :)
- durrrrrrr 11y agoYes. Just some general points or examples.
- wvenable 11y agoI personally feel like PHP OOP is much more like C++. It's just not surprising that two high-level languages based on C++ end up near the same place. PHP is heavily based on C so choosing to make it's OOP features like C++ isn't a big leap. Plus PHP is still far less enterprisey than Java so maybe the OO model isn't the real issue.
- agumonkey 11y agoIndeed, a few years ago Paul Biggar (CircleCI) tried to compile PHP extensively and said it was far too dynamic to do "good" compilation (I'm distorting his words a lot here).
- debacle 11y agoYeah I really miss the good old days of PHP3. /s Zend has made a lot of good decisions (and a few painful but livable bad ones) over the last decade.
- e12e 11y agoYou could say that PHP == "static language", even if you maybe can't say PHP === "static language"?
- wvenable 11y agoThat's a disturbingly clever way of putting it. :)
- kodablah 11y agoIt has been picked for a long time now, so it is hard to put yourself in the heads of the designers at that time. Having said that, PHP OO (like C#, ActionScript, etc at that time) was probably inspired by Java for pragmatic reasons.
- vpkaihla 11y agoBecause it was familiar to them and they didn't bother to research more. That applies to a lot of decisions the PHP folks have made in the past. Who knows, perhaps it's one of the biggest reasons they're so successful, however much we who know better dislike that.