lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


David Given wrote:
> What about a Lua->Javascript compiler? They're similar languages; it shouldn't
> be too hard. Yes, Javascript is nasty but it's *everywhere*. It allows rich
> interaction on just about everything --- I can use Google Maps on my Wii.
> Being able to write code in Lua, with all of its RAD abilities, and then
> deploy onto any web browser would be very cool. Take a look at Google Web
> Toolkit sometime; it does this for Java. Unfortunately, Java is very
> cumbersome for writing UIs in.

This is backwards.  The better approach would be to implement a
JavaScript to Lua bytecode compiler and standard JavaScript libraries.
Sneak it into browsers as a drop-in replacement for Spidermonkey to
improve performance.  (SpiderMonkey is no match for Lua, even with the
layer of JavaScript compatibility crud which will be required.  And then
there's LuaJIT for x86...)  Once that is in place, you can offer the
option to just code in Lua directly.

--John