andrewducker (
andrewducker) wrote2010-11-11 12:55 pm
Coding in web browsers
At the moment we write Javascript in web pages, which is then compiled down by the various JIT methods that Firefox/IE/Webkit use to make it super fast.
Seeing as what's run clearly isn't the actual JS itself, but bytecode, why not have a standardised bytecode that all browsers would support, which would then mean you could write your code in any language you liked, providing there was a compiler to convert it to the standardised bytecode?
At the moment Google uses GWT to convert Java into Javascript that then gets converted into the running code, (And MS used to have something similar) wouldn't it be handy if the intermediate step wasn't necessary?
no subject
First is turning the source into platform-independent bytecode, this happens upfront.
Second is "Just in Time compilation" during execution, when the runtime needs to use a method that has not been used before, and so needs to turn the bytecode for it into something that can actually execute on whatever cpu.
I'd say that Andrew is referring to the first of these.
no subject
no subject
There's no good reason why they shouldn't be able to write in Ruby/Python for the browser just like they do on the server end.
no subject