DEV Community

Discussion on: Javascript needs competition on the front end. Thoughts?

Collapse
 
nektro profile image
Meghan (she/her)

I don't like WASM as the end all of the next step in Web performance because it ruins a big part of the openness of the Web. If WASM really takes off, then gone are the days of being able to view-source on a Web page and see how it works. Even a text based bytecode would be better than the current format. Though my real ideal situation is just for JavaScript to become statically typed.

I really did like WebAssembly in concept. Something I've been reading about recently which I will eventually do a full post on is a project by Oracle called GraalVM. In it's core, is basically a framework to create programming languages in such a way that they are interoperable with all other languages made with the framework as well as being immediately compatible to be run on the JVM. Making a JVM is really hard so I really loved this idea. ((the refernce Ruby implementation they made is ~400x faster than real Ruby iirc))

This is what I imagined WebAssembly to be when I first heard about it. A base open format that multiple languages could target to gain the speed benefits that JS engines have already built. Kinda like .NET

Collapse
 
joshcheek profile image
Josh Cheek • Edited

It's a good point, but I'd assert that we lost that a while ago. Minification, obfuscation, optimization, etc, mean JS is often as unaccessable as WASM. On the bright side, the WASM tooling is looking pretty good and could help devs make sense of it. Of course, if you're at that point, you're probably past "view source" to make sense of things. I suspect that the way this learning will manifest, going forward, is via OSS (meaning access to the uncompiled source). But it is definitely a good point, and it's the same sentiment that causes me ambivalence around HTTP/2's TLS everywhere (I know there are ways to get around that, too, but they're cumbersome and require you to really know what's going on).

Anyway, I'm a fan of it, b/c I think the browser should be treated like a platform (due to watching a lot of Alan Kay, esp The Computer Revolution Hasn't Happened Yet), so my POV is that it should have always been a bytecode interpreter, and WASM corrects that problem.

I'd love to read your post on GrallVM, btw! I read their paper on Truffle, a while back and what I understood of it sounded astoundingly cool! Also, they've been really kicking ass on the optcarrot benchmark (I don't think it was 400x, but it was impressive enough that I stopped and took note).