Hacker News new | ask | show | jobs
by tdumitrescu 3643 days ago
It's interesting that the discussion in this thread centers around what to call modules, components, and packaging units. It's like saying that JVM bytecode is a way to author JARs, when it's actually the other way around: JARs are a way to package classes packaging JVM bytecode, which is a compilation target for various languages. WASM is similarly a compilation target for code; whether it's a module of code or a capsule of code or a script tag of code isn't really the point, and "source code" remains an uncountable noun (http://www.edufind.com/english-grammar/countable-and-uncount...). And that it's supposed to be browser-agnostic is cool, but surely the bigger picture is that it's source-language-agnostic.
1 comments

Initially my thought was to compare it to the first compiler, back in the days when punch cards were the interface, but I decided against any history lessons that go that far back. In that analogy, the byte code is the machine, and now we all need to be writing compilers for it. This is why so many languages compile to javascript, it's the assembly of the web (not my trademark), in the browser world at least. If you want this code to run in that browser, you gotta pay the penalty of cross compilation inefficiency.

I actually think being browser agnostic is more important; it is sort of the reason we're even looking at wasm replacing asm.js in the first place. asm.js is still javascript, even though it gets handled differently under the covers. Having a second option of language supported by all major browsers is a huge deal, especially one with static typing.

As for the naming thing, a little bit of bikeshedding is healthy from time to time.