Javascript is nice, but for the better performance, why web browser(ie/chrome,firefox,safari) do not add lua vm? or make lua vm become a part of web browser standard?
Welcome any comment
Javascript is nice, but for the better performance, why web browser(ie/chrome,firefox,safari) do not add lua vm? or make lua vm become a part of web browser standard?
Welcome any comment
Because today's JIT compilers for Javascript are just as fast, if not faster than, JIT engines for Lua.
The web experimented with different client-scripting languages in the mid-1990s (when we had LiveScript (an early JavaScript), VBScript (thank you, Microsoft), as well as Tcl. The web decided it didn't like that and we settled on a single language (JavaScript, now EcmaScript).
Lua offers no real advantages and introduces a massive workload (the DOM API would need to be implemented, for example, and Lua has different semantics to EcmaScript (with respect to typing and how functions work, amongst other things) so the majority of web developers would need to relearn their trade.
There just isn't a business case in it.