|
I was thinking of replacing require with a macro which would declareOn 9 July 2010 04:45, Fabien <fleutot+lua@gmail.com> wrote:
> On Fri, Jul 9, 2010 at 12:16 AM, Henk Boom <henk@henk.ca> wrote:
>> I would love for all variables would be statically and
>> lexically scoped, so that the compiler could generate compile-time
>> error messages for undeclared variables.
> Not reliably: since require() is a regular function call on a regular global
> var, it can be constructed in arbitrarily complex ways.
static variables for imported names, something like the way PLT-Scheme
does it. It requires that you know what names a serving module
provides when you're compiling the client module though.