Ask HN: Why don't browsers just build a non-JS interpreter?
5 by spprashant | 9 comments on Hacker News.
This is definitely a super noob question and possibly misguided. I don't work front end at all. But I am quite aware of the mountain of frameworks built on JavaScript to support modern web applications. I was reading up on WebAssembly and how one of its intentions was to allow people to write browser code in other languages of their choice. However it seems that is proving to be quite difficult and you still have to fall back on JS at some point. It got me thinking why don't Google, Mozilla, Apple (and Opera?) come together and build a non-JS interpreter into the browser? Google apparently tried to put Dart interpreter into Chrome but gave up somewhere along the way. So it seems possible, but just a matter of tremendous effort. Obviously right off the bat I can think of dozen issues with this suggestion. - This is huge engineering task, maybe impossible to achieve. Maybe it not feasible to have more than one interpreter in a browser without crashing the entire system. - Maybe big browser vendors have no interest in doing so. They actually prefer JS? - JS is actually fine, and any other language runtime will run into the same issues. I am just looking for someone to explain to me at a high-level why this is a terrible idea. Thanks!

Post a Comment

Previous Post Next Post