Live data from Hacker News

What makes WebAssembly fast?

hacks.mozilla.org

151–160 of 238 posts

Re: What makes WebAssembly fast?

#151

Earlier quoted context omitted.

I agree completely, but I would take it a step further: If wasm doesn't overtake JS, something else that offers native bindings to other languages will eventually. There are huge benefits to be had for teams that want to be able to code their full stack in a language that isn't JS. We never asked for JavaScript (well the vast majority of us), but we've been stuck with it for the past two decades for all things web. N…

> something else that offers native bindings to other languages will eventually... No it won't. This is our one chance to kill javascript; if we don't do it now, it'll be entrenched forever, and best we'll ever get is 'compiles-to-js' languages like clojurescript and typescript. Let's be realistic; who has the man power, community good will and business savvy to push an entirely new language across all platforms, mob…

Jup, I think pretty much the same.

JavaScript is freaking everywhere.

Your DMS? Chances are it understands JavaScript.

Your scanning software? Understands JavaScript.

Your security gateway? JavaScript.

You API management software? Also JavaScript.

And a ton more. JavaScript is here to stay.

Re: What makes WebAssembly fast?

#153

Earlier quoted context omitted.

Yes. People really hate JavaScript that much. ES6 brought some sanity to the language, but I continue to be firmly in the camp of continuing to hate and despise its existence.

This could be said for any language. Yes. People really hate C that much. C++ brought some sanity to the language, but I continue to be firmly in the camp of continuing to hate and despise its existence.

It's a bit different. For system level programming you have a choice to get around C/C++.

For browser programming, or full stack in a single language, you have less choice, and none if you reject transpiling.

Re: What makes WebAssembly fast?

#154

My excitement for WASM has nothing to do with speed or efficiency of the runtime. It's all about finally having a universal compile target for the web. We're finally going to be able to develop web apps in a proper language of our own choosing, without needing hacks like TypeScript. Hopefully, this will lead to real dedicated IDE tooling and standardized libraries for the web along the lines of what's available in iO…

True. I agree with it all.

However, by then, TypeScript might be so darn good that people choose to keep going with it!

It really does have a better type system than C# in a lot of ways.

Re: What makes WebAssembly fast?

#155

Earlier quoted context omitted.

> something else that offers native bindings to other languages will eventually... No it won't. This is our one chance to kill javascript; if we don't do it now, it'll be entrenched forever, and best we'll ever get is 'compiles-to-js' languages like clojurescript and typescript. Let's be realistic; who has the man power, community good will and business savvy to push an entirely new language across all platforms, mob…

Is TypeScript as annoying a language to code in as Javascript? Or is it comparable to other modern languages like Swift and Go? If it is, I'd say that pain of dealing with Javascript (for developer productivity and happiness) is already taken care of.

TypeScript is a joy to program in. I was on a project where we had the opportunity to turn on all the strict checks (no use of any, no implicit nulls, etc.), and it was super enjoyable and efficient to program in.

You have algebraic types (well, 99%), union types, and concise ways of expressing tree types.

I would imagine it is more pleasant than Swift or Go, though I haven't used either of those very much.

Re: What makes WebAssembly fast?

#156

Earlier quoted context omitted.

no, WASM will not replace JS unless somehow, overnight, the idea of downloading 30mb of compiled runtime libraries to read an inaccessible-to-screenreaders news article becomes appealing. but i wouldn't hold my breath for 1990's style java applet loading throbbers to come back into fashion. there's a reason that stuff got outcompeted by the supposedly "inferior" javascript. what wasm competes with is flash games, ins…

Well, 5G is not that far. Remember when SPA was considered too "fat"? Now most of the web apps are SPA with few MBs to download.

SPAs are still considered too fat. how do you miss the nearly daily "web bloat crisis" stories on HN?

Re: What makes WebAssembly fast?

#157
post #142

Earlier quoted context omitted.

no, WASM will not replace JS unless somehow, overnight, the idea of downloading 30mb of compiled runtime libraries to read an inaccessible-to-screenreaders news article becomes appealing. but i wouldn't hold my breath for 1990's style java applet loading throbbers to come back into fashion. there's a reason that stuff got outcompeted by the supposedly "inferior" javascript. what wasm competes with is flash games, ins…

It got outcompeted by Flash, JavaScript had zero to do with it. Had Apple not forbidden Flash on iOS, there would be no JavaScript superiority to talk about.

I invite you to try your favourite flash website in Puffin browser to see how "great" an experience flash on an iphone is.

Re: What makes WebAssembly fast?

#158
post #142

Earlier quoted context omitted.

no, WASM will not replace JS unless somehow, overnight, the idea of downloading 30mb of compiled runtime libraries to read an inaccessible-to-screenreaders news article becomes appealing. but i wouldn't hold my breath for 1990's style java applet loading throbbers to come back into fashion. there's a reason that stuff got outcompeted by the supposedly "inferior" javascript. what wasm competes with is flash games, ins…

It got outcompeted by Flash, JavaScript had zero to do with it. Had Apple not forbidden Flash on iOS, there would be no JavaScript superiority to talk about.

[deleted]

Re: What makes WebAssembly fast?

#159

What makes a compiled executable faster than interpreted code seems kind of self evident.

I see what you mean, but it's actually possible for JITed code to be faster than compiled code, as JIT can make run-time optimisations that aren't visible at compile-time.

Re: What makes WebAssembly fast?

#160

Earlier quoted context omitted.

This could be said for any language. Yes. People really hate C that much. C++ brought some sanity to the language, but I continue to be firmly in the camp of continuing to hate and despise its existence.

It's a bit different. For system level programming you have a choice to get around C/C++. For browser programming, or full stack in a single language, you have less choice, and none if you reject transpiling.

Right, with JS there's almost no choice. C/C++ I actually really like, but I fear the great harm that I can inflict upon myself and others with them.

Anyway, the nouns are important.

Post reply on HN