Q: Why browsers can't get a newer/different programming language other than JS?

I have wondering, since there are a lot of efforts going on improving JS or to support webassembly. Why it's in that direction?

Another direction would be, making browsers use hardware resources, like apps can do on smartphones, or basically like any other software, Or maybe probably completely support a whole new language that would be built specifically for frontend needs other than JS?

Is that not possible? is this why the efforts are going into the JS/webassembly direction?

Start a personal dev blog on your domain for free and grow your readership.

3.4K+ developers have started their personal blogs on Hashnode in the last one month.

Write in Markdown 路 Publish articles on custom domain 路 Gain readership on day zero 路 Automatic GitHub backup and more

Comments (2)

Mark's photo

Indeed that is why WebAssembly has been created and is growing.

Nobody agrees which language is best, and adding many languages would be a maintenance nightmare for browser maintainers.

So that's why they didn't add a bunch of languages for humans, but a single one for compilers to target. That way people use Rust, C++, assemblyscript but the browser only supports one language...

People were already kind of doing that workflow, with many languages targeting JS, like CoffeeScript, Typescript, Kotlin, Dart, ClojureScript... Which kinda works, but Javascript is not designed for performance, or for being a convenient compile target.

So that's why WebAssembly is great news, will hopefully solve many problems, and should have been introduced much earlier.

As for hardware access, browsers have apis to access things like cameras and microphones, and there's webGL for graphics hardware. However there are more security considerations than for desktop programs, and arguably more than for apps, because there isn't an install step where users can consider security implications.

Bonus Catch's photo

So as per what I have perused in this conversation, it comes down to that JavaScript has an imposing business model as in it is the main thing that is embedded in all significant programs, so one needs to come in contact with that at any rate once in a while, with regards to web applications. I read this post because I was searching for the Bonus for Real Money and I got a bonus catch website where I got all Bonus which I needed. So during this process, I got your post and I like the information shared by you.