by PommeDeTerre · 13y ago · 0 comments
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.
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 (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.
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.
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.
"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. :-)