4 ms·
I never understood the simultaneous hate of PHP and praising of JavaScript. They're both awful languages that are popular because amauteur programmers can easi
by JoeKM 13y ago
I never understood the simultaneous hate of PHP and praising of JavaScript.
They're both awful languages that are popular because amauteur programmers can easily get started and churn apps. There is just as much, if not more, horribly written spaghetti JavaScript out there, even by Rails and Python developers, as there is horrible PHP code.
The only reason people don't belittle JavaScript (as much) is because there are no other options. If there were, I think JavaScript would easily be the next PHP (and for good reason).
- TheHydroImpulse 13y agoJavaScript has a mixed praise. Some people hate it but still use it because it's the only option, while other people love it to death. I think once people know how to use JavaScript appropriately and uses it's strengths then it's a much better language. Back in the day I found JavaScript weird and messy but that was partly how I used it. The prototype pattern is extremely powerful and JavaScript is a multi-paradigm language, which is great. OOP or Functional, it's your choice. With the rise of really good front-end frameworks (they're getting better), the quality of JavaScript applications is getting better and better and Node.js has also done a really good job at boosting JavaScripts rep. I do think the standards body is greatly flawed and all the different browser implementations are increasingly frustrating. The ability to use new features is extremely little, unless you use JavaScript as an embedded language in another application (i.e HTML5 App in a native context). I don't think JavaScript will be the next PHP.
- mikeash 13y agoThere's awful, and then there's PHP. JavaScript isn't a great language, but it's OK. Maybe "awful", but lots of languages are. PHP, on the other hand, is in a class of its own, far worse than JavaScript or any other mainstream language I've experienced.
- Joeri 13y agoI write javascript and php code for a living, and i don't think they're in the same class. Javascript is a nice language with warts tacked on, php however is not a nice language no matter how much you squint. For example, javascript at its core has a string type that is treated like an array of characters in proper unicode, with a sane extensible method-based string api. PHP at its core by contrast only knows byte arrays and its string handling (global!) functions are basically useless for dealing with unicode (there's mbstring and intl, but too many people don't use those).