3 ms·
A lot of those problems you mention are due to JavaScript realistically being the only language available for client-side web development. It's just not a good
by PommeDeTerre 14y ago
A lot of those problems you mention are due to JavaScript realistically being the only language available for client-side web development. It's just not a good language for anything but the shortest of scripts.
It lacks a proper type system. It lacks proper support for namespaces and modularity. It is full of far too many inexcusable flaws ("quirks", as its advocates like to call them), even in such basic functionality as its equality comparisons. It's full of features that are outright harmful. Prototype-based OO has proven, in practice, to be inferior to the more traditional class-based OO approach. It's just one problem after another when using JavaScript.
CoffeeScript and other languages that "compile" down to JavaScript may help somewhat, but their JavaScript legacy is still generally quite apparent. Instead of being "good", they're just "not as outright horrible" as JavaScript.
Things would be much better if there were a wider variety of languages supported by browsers, including ones with the feature set necessary for effective, large-scale software development.
- rbrcurtis 14y agoWith commonJS javascript is a perfectly good language to write real, large code base apps in. With coffeescript, it's a pleasure.
- drdaeman 14y agoI've recently used Require.js to load JS libraries (client-side) and had more problems (working around libraries that know nothing about R.JS/AMD), than benefits. Not sure how it is with CommonJS. IMHO, when compared to asset compilers in many modern frameworks, the profits are disputable.
- PommeDeTerre 14y agoCommonJS is a very good example of what I was talking about. It's nothing more than a hack to work around JavaScript lacking proper language-level support for namespaces and modularity.