DEV Community

Discussion on: What's wrong with code in 2022? 🤷🏻‍♀️

 
pengeszikra profile image
Peter Vivo

Actually you can write any languages to browser compiled to WASM/JS/HTML. By the way if you create any JS/HTML application that is also need for compile to proper JS target, mainly ES5 for compatibility reason.

I think actual browsers is so complex application - with tons of unused API ( surprise ! ), any extra languages will be raise these complexity unnececcary.

const speak = sentence => speechSynthesis.speak(new SpeechSynthesisUtterance(sentence));
speak('What did you think about browser complexity?');
Enter fullscreen mode Exit fullscreen mode

The good question is:
Why don't able WASM reach these API endpoint and HTML page without any JS code?