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?
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
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...
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.