Slashdot Mirror


WebAssembly and the Future of JavaScript

Nerval's Lobster writes: WebAssembly is the next stage in the evolution of client-side scripting. In theory, it will improve on JavaScript's speed. That's not to say that JavaScript is a slowpoke: Incremental speed improvements have included the rollout of asm.js (an optimized subset) in 2013. But WebAssembly—while not a replacement for JavaScript—is intended as a "cure" for a variety of issues where JavaScript isn't always a perfect fit, including video editing, encryption, peer-to-peer, and more. (Here's a full list of the Web applications that WebAssembly could maybe improve.) If WebAssembly is not there to replace JavaScript but to complement it, the key to the integration rests with the DOM and Garbage Collected Objects such as JavaScript strings, functions (as callable closures), Typed Arrays and Typed objects. The bigger question is, will WebAssembly actually become something big, or is it ultimately doomed to suffer the fate of other hyped JavaScript-related platforms such as Dart (a Google-only venture), which attracted buzz ahead of a Minimum Viable Product release, only to quickly fade away afterward?

7 of 175 comments (clear)

  1. WebAssembly by Anonymous Coward · · Score: 2, Insightful

    Never heard of it. Probably a passing fade. I predict decades more of Javascript and (alas) Flash.

    1. Re:WebAssembly by narcc · · Score: 4, Insightful

      Here's something you might not know: Your personal use case is not representative of the world at large.

      Flash is still quite popular, and isn't likely to vanish any time soon. Millions upon millions of users engage with flash content on the web daily. It's going to take a very long time for alternatives to catch-up in terms of authoring tools and, most importantly, content. It'll take even longer for that old content to fade into obscurity -- just like Java applets before it.

      I know it's cool to play the ideologue, but it's foolish to deny the obvious reality. Flash is going to be with us for many years.

  2. I don't think it will gain much traction by msobkow · · Score: 4, Insightful

    One of the big "security benefits" I've heard claimed is that WebAssembly will only be able to invoke the same functions/methods as JavaScript itself. So that implies that WebAssembly is nothing more than pre-compiled JavaScript.

    As the compile phase of JavaScript pales in comparison to the execution phase, the only people I can see pushing for this are those who want DRM-style protection of their JavaScript so no one else can read it.

    --
    I do not fail; I succeed at finding out what does not work.
  3. Different languages by wrmrxxx · · Score: 5, Insightful

    JavaScript execution speed is not the important thing about WebAssembly. What does matter is that it may open up the development of software for execution inside a browser to a wider variety of languages, almost all of which are likely to be better than JavaScript in one way or another.

    1. Re:Different languages by markus · · Score: 3, Insightful

      JavaScript isn't necessarily such a bad language; otherwise, we wouldn't see Node.js gaining so much popularity.

      But you are of course right, that there isn't a one-size-fits-all language, and there are plenty of problems that can better be solved in other languages. Allowing more choice of languages for web apps is a good thing.

      Also, some of the more advanced JavaScript features that are in the pipeline (or starting to be deployed) are really cumbersome to program manually. All the work that will allow implementing pthreads in JavaScript is really low-level. It'll be nice to have compilers that target these features.

    2. Re:Different languages by weilawei · · Score: 3, Insightful

      JavaScript isn't necessarily such a bad language; otherwise, we wouldn't see Node.js gaining so much popularity.

      Bandwagon appeal. With your UID, you ought to know better. Provide a technical argument and/or step away from the keyboard until you've thought it over. Note that I'm not saying there isn't a good reason--only that your given argument is crap.

  4. Re:Webassembly means... by cb88 · · Score: 4, Insightful

    Javascript doesn't have robust anything....