6 ms·
JavaScript was based on Scheme with a "C-like" syntax to make it more widely appealing, so spiritually JavaScript is LispScript. More to your point, other brow
by ynniv 17y ago
JavaScript was based on Scheme with a "C-like" syntax to make it more widely appealing, so spiritually JavaScript is LispScript. More to your point, other browser scripting languages have been done and already failed. IE supports VBScript, Firefox could at one point support Python via an extension. The reality is that browser implementors want to support all sorts of things, but the only ones that matter are those that are supported in all browsers. Since you cannot create a new browser without supporting JavaScript, and JavaScript solves the code problem, it is the only language that will ever be used in browsers.
Which leads into the second question: whats wrong with compiling to JavaScript? Compilation is historically (outside of a VM) the only way to write portable code. Most compiled languages have a toolchain that covers compiling, profiling, and debugging, and there is no reason to assume that a language compiled to JavaScript could not have these as well (ex an external profiler might look like dynaTrace Ajax).
You might not like JavaScript, but its all we're going to get. Most people don't like programming x86 assembly, but I don't see them complaining that CPUs need to support a different assembly language.