There is no need to add suport for multiple languages, a solution would be to standardize on a generic bytecode that could be used by language implementors. But there is currently no plans for this (it's been suggested).
Adding another "standard" language promotes all sorts of fun little issues.
- How will they work with other languages?
- Will the DOM be shared?
- Could scripts written in both still work?
- Porting libraries to both
Browsers have to be standardised, so that what you develop works everywhere, on all browsers.
If you have multiple languages kicking about, then you have to ensure that they all perform very similarly. If you are a web developer and you have a choice of languages, which may or may not be supported in some locations, then that is an additional headache.
There are several responses here which claim that supporting multiple languages would make it very odious for builders of web browsers to ensure they're compliant with all the languages. To me this seems incorrect.
- As client-side apps get larger and more complex, the benefits of structured, typed languages such as Java and Scala increase.
- You would have access to true multi-threading, and through Scala, a collections library optimized for multi-core computing.
- You could use any of the thousands of open source java libraries inside the browser.
- Through libraries like openGL, the browser could provide access to advanced graphics and graphics-card computing capabilities.
- If you had java running on the client and server side, you could further benefit from client-server communications via extremely compressed, binary object-graph serialization = faster loading and performing web pages.
EnvJs - A headless browser built on top of Rhino.
In summary, it seems like a contradiction to port the other languages to the browser when instead we can port this single browser language to the server and bridge that gap in a more unified manner.