4 ms·
WebAssembly doesn't really have anything to do with Javascript. As for being good enough now: not yet. It's getting closer, another iteration or two and I think
by paol 9y ago
WebAssembly doesn't really have anything to do with Javascript. As for being good enough now: not yet. It's getting closer, another iteration or two and I think it could settle down for a while. Also it's worth noting the rapid pace of change in the JS specs is a recent phenomenon. It was stagnated for years before that.
- ricardobeat 9y agoWASM-compiled code might completely replace javascript, being faster at all stages: loading, parsing and execution. That's probably the point he was making.
- krapp 9y agoWASM compiled code doesn't improve upon the use of javascript as a scripting language, only javascript as 'bytecode.' I don't think WASM would replace javascript in those cases, unless you could drop another language into a script tag and have it work as easily for basic DOM manipulation, which people still do.
- ricardobeat 9y agoThat’s true, but the vast majority of web sites today are already compiled applications.
- phpnode 9y agoMajority of top 1000 websites perhaps, most websites aren't compiled at all, they just link to jQuery on a CDN somewhere.
- ricardobeat 9y agoWordPress powers almost 30% of the others, and could also switch to WASM whenever they feel like it.
- irrational 9y agoVast majority? Do you have data to back that up? I'd bet the data would show far below 10% of websites are compiled applications (I'd be shocked if it approached 5%).
- ricardobeat 9y agoWhen I say 'compiled' I'm abusing the term to mean they have any kind of build step, and could not be written the same way by dropping code into a script tag [1] as said in the parent comment. For the most part what comes out of the build process could be replaced with WASM at a whim, whenever it gains access to all the DOM and browser APIs. The majority of news, social media, video, media sites, message boards, online games and web apps fit this description. I'd wager that 95%+ of websites produced by a paid professional today are in this category. Unfortunately no, I don't have data to back this up, only my perception as a web developer. [1] due to relying on a module system, es6 transpiler, etc
- krapp 9y agoI think "vast majority" is an overstatement, unless you're counting by popularity and not sheer numbers. I also don't consider a website serving machine-generated javascript to be a "compiled application" analagous to a C, Flash or Java binary (whereas WASM would be,) but almost every time I try to go down the "javascript is not machine code or bytecode" rabbithole, I get downvoted to oblivion.
- z3t4 9y agoi find it amusing when a lower level lang compiles to a higher level. but i still think its the right word. another word is assembled when assembly goes into machine code.