Re:The Two Pillars of JavaScript: Part 1: How to Escape the ...
by hcarvalhoalves on Saturday December 13, 2014 @09:32AM
(#8745235)
> You can make any language available in a script block and have it interpreted using a polyfill. If JS sucked as bad as some people think, this would have taken off - it hasn't.
That's not trivial.
People are cross compiling to javascript as part of a build process though, so you're wrong that it hasn't taken off. Coffescript, Typescript, ClojureScript, Elm, etc.
https://github.com/jashkenas/coffeescript/wiki/list-of-langu...
You can't solve the problems of using OOP in JS. JS is functional at its core. OOP style class inheritance is completely inappropriate, and bolting it onto JS was bad overall for the language as wandering off the functional style creates some confusion and now the language inherits the problems of class inheritance.
Separation and extensibility are the great things to get. Separation you get in function scopes. Extensibility isn't obvious, so they bolted on OOP. It can be achieved but you have to go deeper into the functional world and people started demonstrating class inheritance as the answer. Was unfortunate.