[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: compile-time globals
- From: Thomas Lauer <thomas.lauer@...>
- Date: Tue, 21 Aug 2007 09:49:45 +0100
David Manura <firstname.lastname@example.org> wrote:
> > However, I've run into a problem ...module() is a runtime feature and
> > the compiler knows nothing about it
> True, require/module will need to be a compile time construct.
> I've updated LuaFish (which was recently announced on this list) to do
> something like this. Again, it's quite preliminary, but one of the included
> examples is shown below.
Indeed. A meta level might be one way to solve that problem. However,
the beauty of doing those checks directly in the compiler (besides raw
speed advantages) would have been that it's a self-contained piece of
code in the parser.
I think I will at some point include a feature along what you outlined.
There are many interesting things one can do within a compile-time
section of Lua code.
web : http://thomaslauer.com/start