“I'm on Ecma TC39 and in touch with JS hackers working for all the major browser vendors.” (comment)
recommended by 1 user | 2010 | BrendanEich on: Why are we limited to JS in browsers - would a bytecode… | aged poorly | javascript | original thread |
BrendanEich on Nov 15, 2010 | on: Why are we limited to JS in browsers - would a bytecode standard help? | view on HN

I'm on Ecma TC39 and in touch with JS hackers working for all the major browser vendors. FWIW, as far as I can foresee there will be no standard JS bytecode. Commenters here touch on good reasons:

* divergent, evolving VMs can't agree (not all NIH, see third bullet);

* IPR concerns;

* lowering from source over-constrains future implementation, optimization, and language evolution paths;

* view-source still matters (less, but still).

A binary encoding of JS ASTs, maybe (arithmetic coders can achieve good compression; see Ben Livshits' JSZap from MSR, and earlier work by Michael Franz and Christian Stork at UCI). But this too is just a gleam in my eye, not on TC39's radar.

Meanwhile, we are making JS a lot better as a target language, with things like ES5 strict mode, the ES-Harmony module system and lexical scope all the way up (no global object in scope; built on ES5 strict), and WebGL typed arrays (shipping in Firefox 4).

We have a Mozilla hacker, Alon Zakai, building an LLVM-based C++-to-JS compiler. Others are doing such things (along with good old SNES emulators and the like).

So being a good mid-to-high-level, memory-safe compiler target language is on TC39's radar. Not to the exclusion of other JS desiderata, and never in a way that compromises mass-market usability or buy-by-the-yard rapid-protoyping "scriptability". But one among several goals.

One user recommended this comment. What they said:
AndrewDucker Jun 17, 2015 | on: From Asm.js to WebAssembly | context | aged poorly

Interestingly, about five years ago, he said he couldn't see this ever happening: https://news.ycombinator.com/item?id=1905291