Can someone explain why I might want to use Lua in a browser over JS? Does it have a fundamental feature that JS does not have?
Cool name btw!
Can someone explain why I might want to use Lua in a browser over JS? Does it have a fundamental feature that JS does not have?
Cool name btw!
Lua is pretty much JS done right, which actually makes it a poor choice for something like this IMO. A program written in Lua is not going to be fundamentally different from the same program written in JS, and the problems introduced by using this (worse debugging experience etc.) are very likely to outweigh the benefits of avoiding JS's warts.
How do you know? Maybe try this first? Apparently, there is a in-browser debugger you can activate just by including two files. This is theoretically a first-class debugger that doesn't even need source maps.
http://moonshinejs.org/how-to/debug-locally/
Were you assuming that Moonshine is a compiler targeting Javascript? It's actually a Lua bytecode VM.
For more info: $ moonshine help distil
At that point we'd probably see some subset of JS devolve to a bytecode, I'll bet.