3 ms·
> Tools That Convert to JavaScript are a HACK [..] they’re usually full of edge cases, varying browser support, inconsistent performance and other strangeness.
by azakai 12y ago
> Tools That Convert to JavaScript are a HACK [..] they’re usually full of edge cases, varying browser support, inconsistent performance and other strangeness.
The second part is true of any platform that has multiple independent implementations, it isn't because compiling to JS is a hack (which it is; but that's irrelevant here). If everyone used the same browser with the same rendering engine and the same JS engine, we wouldn't have browser support issues, inconsistent performance, etc.
It's not just compiled-to-JS languages that have browser incompatibilites etc., it's also HTML and CSS, and non-compiled JS. The issue is the fundamental tradeoff of the web being a spec that anyone can implement, which keeps the web open. But it also means multiple implementations with different performance characteristics and so forth.
The web was never designed to be an ultra-consistent platform that is super-easy to develop for, which is what the article pines for. If you do want such a thing, the closest is probably Flash - good developer tools, single implementation. It was good for some things, but being a single implementation was one reason why it is losing popularity.
With all that said, the web is actually gaining powerful low-level capabilities these days. So you could build something more consistent on top of those. Specifically, you could render UIs using pure WebGL and avoid much of the overhead of the DOM and JS. And compile-to-JS languages can give you more predictable performance than JS itself, because they can emit simpler code (e.g., no garbage collection necessary). There is a big opportunity to create a tool using those two which would give a much better developer experience than the web currently has.