I know this question has been asked a million times, but will WebAssembly ever get native DOM access? Seems like that would be a good catalyst for switching away from JavaScript, at least on the client side.
Do you need native access? Frameworks like Blazor are doing some interesting stuff without it. Sure there's still a translation layer and JavaScript code in between but overall the project is starting too look really interesting as far as alternatives to JS go.
Of course it could be another Silverlight in the making.
Blazor computes the DOM deltas in webassembly/.NET code in the browser and then sends those deltas to the translation layer which then performs the changes to the DOM. This process would get a considerable performance boost if webassembly were allowed to access the DOM directly.
Silverlight required a plug-in. That's a barrier to adoption that they never overcame. When plugins were outlawed it was impossible to continue Silverlight. Microsoft had seen the writing on the wall and had effectively abandoned Silverligt as a strategic product long before that. Blazor Webassembly is not in the same situation. Webassembly is not going to be pulled. Webassembly is objectively better than Javascript for the task of running code in the browser, so my prediction is that Javascript will be deprecated before Webassembly.
JS is messy but its also general purpose and covers the frontend (by definition) and backend use cases for most applications. There are certainly cleaner languages (go for example, people seems fond of rust too).
JS has huge inertia and I think it will take some time to displace it, even with better options available.
Douglas has some great points but he obviously has not worked in front end development in a long time. It is much easier to stand on the shoulders of giants in JavaScript than write a responsive, material design table with Rust and WebAssembly.
But Doug, what about all the young kids today who are discovering and falling in love with JavaScript for the first time? Can't JS be one of the joys of their generation?