3 ms·
People are not forced to use JS. You can make any language available in a script block and have it interpreted using a polyfill. If JS sucked as bad as some p
by dpweb 12y ago
People are not forced to use JS. 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.
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.
- hcarvalhoalves 12y ago> 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-languages-that-compile-to-js https://github.com/jashkenas/coffeescript/wiki/list-of-langu...
- coldtea 12y agoTaken off = more than very few than use Coffescript et al. Clojure itself barely registers in language popularity indexes -- much less Clojurescript.