+ 1
Why don't we have such a browser that can run any programming code directly?
2 Antworten
+ 13
it exists. if online only, it's rep.l and if desktop I think it's atom. sololearn does pretty good at running a lot of languages, although limited.
+ 4
If you're talking about web browsers, look into WebAssembly. It's still in development, but the goal is to allow languages not traditionally used for web development (C, C++, etc.) to be compiled into bytecode that can be run in the browser.
As to why we generally use JS for running code in the browser, it just got lucky. It was the first client-side scripting language introduced, and was standardized a year later. Any scripting language could have been just as well, but that's how it worked out.