lua-users home
lua-l archive

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


On Tue, Oct 26, 2010 at 12:45 AM, Jonathan Castello <twisolar@gmail.com> wrote:
> Javascript doesn't even have access to anything os.* or io.* would
> have, so there's no way we could expose it to the Lua implementation
> anyways.

Perhaps the easiest way to get there is a simple Lua -> JavaScript
translator; at first it would be a 'Lua skinned' kind of JavaScript,
and then support for various Lua idioms can be added.  It's hard to
get the semantics _just right_, but ok if you know the flavour of the
language that you're working in.  Especially if there's an interactive
environment for testing out this LuaScript. One would have to be
careful translating table constructors which have mixed array/hash
parts, maybe simply disallowing them.

As for APIs, mostly JS is used to access the DOM and manipulate it.

Interpreting on the browser is hard and likely to be slow-ish.  Easier
for a compiler to do on the server side.

steve d.