WebAssembly and the Death of JavaScript



For more than 20 years JavaScript has been the only ‘native’ language of the web. That’s all changed with the release of WebAssembly. This talk will look at what WebAssembly is, why it matters and crucially what it means for JavaScript and the future of web development. JavaScript brought interactivity to the web more than 20 years ago, and despite numerous challengers, it is still the only language supported by browser. However, as those 20 years have passed we’ve moved from adding a little interactivity to largely static sites, to creating complex JavaScript-heavy single page applications. Throughout this journey, the way we use JavaScript itself has also changed. Gone are the days of writing simple code snippets that are run directly in the browser. Nowadays we transpile, minify, tree-shake and more, treating the JavaScript virtual machine as a compilation target.

The problem is, JavaScript isn’t a very good compilation target, because it simply wasn’t designed to be one.

Born out of asm.js, a somewhat crazy concept dreamt up by Mozilla, WebAssembly was designed from the ground-up as an efficient compilation target for the web. It promises smaller payloads, rapid parsing and validation and consistent performance … and it’s ready to use, right now!

This talk will look at what’s wrong with the way we are using JavaScript today and why we need WebAssembly. It will delve into the internals, giving a quick tour of the WebAssembly instruction set, memory and security model, before moving on to the more practical aspects of using it with Rust, C++ and JavaScript. Finally we’ll do some crystal-ball gazing and see what the future of this rapidly evolving technology might hold.

Talk by Colin Eberhardt at the JS Monthly London Meetup.

Recorded by Pusher.com.

Pusher’s channel: https://www.youtube.com/channel/UCoyqucxoFXDFnh3khD0rjUg

Learn to code for free and get a developer job: https://www.freecodecamp.org

Read hundreds of articles on programming: https://medium.freecodecamp.org

And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp

source

This Post Has 50 Comments

  1. Gecko o

    So, web aps are going to be a thing after all, good thing I already know assembly

  2. Paul Stoleriu

    Programmers that understand nothing about a language keep trying to replace it since the 90s, even though they already have other options. 2016/2017 and they finally develop a compilation target that's no faster than the old language, and has none of the features or bindings for the web APIs. These same programmers enforce static analysis into js frameworks for a dynamic language by adding a compile step negating all of the benefits of a dynamic language.

  3. A guy that uses React, talking about the dead of Javascript and…web assembly. Never mentions Angular, GO and google. Riiiighhtttttt…..

  4. leknyzma

    read more and you will see web assembly can't work without JS… at least at the moment

  5. Archie

    legends never die they become a part of you

  6. Kowbinho

    The guy did a nice talk, with a bit of a catchy title, and everyone down here is commenting how JS won't die, like it is not his own conclusion.
    We really should learn to react to an idea, rather than a catchphrase.

  7. wheatley

    JavaScript is dead, long live JavaScript!

  8. yitzchak909

    Well, considering I use JS everyday, and this is the first time I have ever heard about 'WebAssembly', I would say "You are wrong" with a 98.99% probability.

  9. Christopher D.

    Clickbait garbage, they left out the critical question mark from the actual presentation, and tried to portray it as an assertion

  10. ThePandaGuitar

    I don't think this is a useful question because you will die before JavaScript dies.

  11. Alex

    251 JavaScript developers don't like this video.

  12. AzhKumb

    What's with all these JS fan boys in comment section ?
    Come on guys, do we really want to have JS running web application in 21 century ? It is archaic language and we need WA to finally give us freedom in choosing how to program web.
    The only reason why JS is so widely spread is the fact we didn't have any other option (if you ignore Silverlight or some other failed attempts) !!!
    Now we do ­čÖé … Web Assembly… Thank You God !!!

  13. John Slegers

    Here at Luciad (now Hexagon), we still use Emscripten for one of our flagship products (LuciadRIA) to compile our in-house C++ & OpenGl based GIS mapping engine to WebGl-based asm.js code, which is then used as a visualization layer by hand-written JavaScript.

  14. This title is funny js will never die we use it everywhere rewriting whole system from js to wasm would take years plus there are no many wasm developers around so its not going anywhere At least a 20 year

  15. Serd├žemsvami

    I can agree if you'd say JS is transforming to TS, but JS is not died.

  16. Timmy Anderson

    Please kill it. JS is a terrible 'language'. No real types and type checks, primitive exception mechanism, bizarre semantics (conversions for instance), need of TS or other translators to┬ámake the code less error prone. Welcome back to 90ties…As a C#/C++ developer I hope I get more options to write my code for web browsers than┬áthat interpreted┬ámess that always┬áreminds me┬áthe ancient times of Basic language on my 8-bits Atari…Web development should be moved into 21th century.

  17. Yogesh Singh

    Very insightful talk by an excellent Speaker. Amazing. ­čĹĆ­čĹĆ

  18. AIon

    good talk. very professional ­čÖé

  19. I think

    TBH, "C++ will dies, because C#." would even make more sense at this point.

  20. willinton06

    I really hope JS burns in flames in the last fucking stage of hell

  21. Kristy Polymath

    So …. how does one get started with WebAssembly using Python? I've watched maybe three or four videos on the matter, before this one, and walked away without a clue. It seems that it's too new….everyone is pumping up WASM, but there isn't anything to use right now.

  22. Sumeet Kumar

    Oh!! in 2020 as of now, only thing at peak is COVID-19
    Also JS in not loosing it's popularity any time soon

  23. Jeroen Rombouts

    2 years on… The rumours about JS's death are greatly exaggerated.

  24. Glitch 234

    Javascript is like weed, you can't get rid of it even if you want to. Too many people are learning and using js

  25. Josh Woodcock

    The best way to prevent technical debt is to prevent new obscure technologies and "innovations" from making their way into your code base

  26. Michal

    Just stick to what has been deeply established, survived the test of time and you will never have to worry. C/C++, Java, Python, PHP and JavaScript.

  27. Mark Wonder

    Just came here, in late 2020, to say how funny the title is.

  28. Bjarni Einarsson

    Hmmm… measuring is not the same as measuring. Javascript is optimized. Cached. So when you build a repeat loop of some code, the js compiler skip strait to execution.. no parsing etc.
    That is not the same as happen in the real world. Repeated code is a rare instance.
    Javascript need upgrade. Most vital thing is forward type declaration and strong type checking. Then things are much better for js compiler to parse and optimize.

  29. Osama Abbas

    This talk is stupid and WebAssembly itself is stupid, and it is taking forever to deliver its stupidity. Unfortunately, JavaScript is here to stay if all alternatives are just another Java applets in disguise.

  30. At Risk

    For all the idiots talking about JS not dying…

    Dude, there are two javascript: 1. one that we write (now mostly people write typescript or other variant specific to framework) 2. Pure vanilla javascript target
    We stopped writing pure javascript long back and javascript remained only as a compilation target as described.
    The title actually mean The death of JavaScript as a compilation target

    Now you might write in typescript or Rust or C, all will be compiled to WASM (I mean in near future)
    Who knows, with WASI, WASM will become new platform independent target for other programming language.

  31. Oleksandr R

    3 years passed by. Javascript is still alive and WebAssembly still dead ­čÖé

Leave a Reply