Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

WebAssembly as a lower level abstraction is going to make web dev very interesting once the tech finally pays off, but it's been almost 10 years since it was announced and there's still no viable alternative to javascript to come out of it.

It would have been nice if a cleaner, stricter and more "designed" alternative with full access to browser features had emerged in the meantime. I'd even accept Dart if it had managed to get broad browser support.

Instead we're in a waiting game where we're all forced to use Javascript for any real work until the horizon is crossed and we can finally use a dozen of wasm-targeted languages.



> but it's been almost 10 years since it was announced and there's still no viable alternative to javascript to come out of it

Are you aware if AssemblyScript?

https://www.assemblyscript.org/

But arguably, the main purpose of WebAssembly is to use existing languages on the web, not necessarily invent new ones or even to replace Javascript.


I've been following AssemblyScript for years but I can't recommend it until they figure out closures: https://github.com/AssemblyScript/assemblyscript/issues/798


AssemblyScript can't access the dom without interfacing with Javascript which is a major piece that needs to be solved with wasm generally.

I'm arguing we should have invented a new native language to replace javascript, which could have provided a stop-gap solution until wasm targeted languages are viable.


> which is a major piece that needs to be solved with wasm generally.

I use WASM everyday and I don't agree that this is anywhere near the top of the things that need to be fixed. The DOM is inherently slow by design, accessing it through a JS shim or "directly" from WASM really wouldn't make any difference in performance.

And on the language level, the DOM is just another web API accessed through a wrapper library like https://rustwasm.github.io/wasm-bindgen/examples/dom.html.

Also the "fixed" Javascript is called Typescript (maybe combined with a very strict linter).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: