8 ms·
In my experience, those who criticize JavaScript the most have often used it for many years, and know it extremely well. These people also usually have many ye
by PommeDeTerre 14y ago
In my experience, those who criticize JavaScript the most have often used it for many years, and know it extremely well.
These people also usually have many years of experience with other, far more sensible programming languages, too. I'm not talking about PHP or Ruby, either. Rather, these people know one or more of languages like C, C++, Objective-C, Java, C#, Haskell, Erlang, OCaml, Standard ML or Python inside and out.
With such knowledge, it becomes very obvious just how bad JavaScript is. The utter stupidity of many of its flaws becomes so apparent. These people also can see how it lacks the language features necessary for large-scale, multi-developer, distributed development, and then the subsequent maintenance of such projects. They've felt the pain of its numerous other problems time and time again.
I'd say the reality is much the opposite to what you describe. The ones who advocate JavaScript most often have never used anything else. They don't realize how many of JavaScript's inherent problems, or "quirks" as they like to call them, just don't exist in most other programming languages. If they have used another language, it's usually PHP, which is arguably worse than JavaScript in many ways. While living in this bubble of ignorance, they don't see JavaScript's flaws for what they truly are.
- chris_wot 14y agoI notice you said all that without explicitly naming a single flaw.
- PommeDeTerre 14y agoAre JavaScript's many flaws truly not glaringly obvious to you?
- chris_wot 14y agoNo.
- PommeDeTerre 14y agoI'm truly sorry to hear that. Have you ever used any other programming language?
- jeswin 14y agoYou should perhaps focus on adding value to the discussion, than going on about people you hardly know anything about. JS and Python offer comparable expressiveness for most programming tasks: basic imperative language features, first class functions, closures etc. If you miss list comprehensions, a better syntax for lambdas or classes, go ahead and use the favorite JS shorthand - coffeescript. It _really_ is JS. Even if you don't use coffee, having first class functions would let you write some of those missing features in a library (albeit with a slightly clunkier syntax). Sure there are nuances, like scoping rules. On the plus side, having a single programming language on the server and client saves some time. Also, most of the libraries being async in nature helps in typical I/O heavy apps. I draw these inferences from a medium sized JS project I have going on at http://www.poe3.com http://www.poe3.com (source: https://github.com/jeswin/poetry-source https://github.com/jeswin/poetry-source). I am fairly convinced that JS did save me a lot of time. Interested in seeing how you came to your conclusions.
- Turing_Machine 14y agoYou're using C as an example of an "unflawed" language? Wow. Don't get me wrong, C is outstanding in its problem domain, but it certainly has no shortage of rope with which to hang yourself. "These people also can see how it lacks the language features necessary for large-scale, multi-developer, distributed development, and then the subsequent maintenance of such projects." The Gmail team might disagree.
- PommeDeTerre 14y agoI said "far more sensible", not "unflawed". Please don't misquote me. And, yes, C is a far more sensible programming language than JavaScript is. C may not be perfectly defined, but at least it isn't full of stupid gotchas like JavaScript is. C doesn't bungle such basic things as equality checks, for instance. C also doesn't include idiocy like semicolon insertion. C can be risky to use in some cases because it offers an extremely high degree of power and flexibility to the programmer. JavaScript is risky to use in all cases because it is rife with design mistakes and other inherent flaws that make it much too difficult to write reliable, maintainable code.
- Turing_Machine 14y agoYou were comparing Javascript with the "utter stupidity of its many flaws" to "far more sensible" languages. "C doesn't bungle such basic things as equality checks, for instance." 2.0 == 2? False. Most people would consider that a flaw. As programmers we understand that integers and floats are different in the computer, but that's not how it works in math. "C also doesn't include idiocy like semicolon insertion." You must really hate the languages that don't use semicolons at all. :-)
- eurleif 14y agoHuh? http://codepad.org/aWPtQRMt http://codepad.org/aWPtQRMt
- Turing_Machine 14y ago