lua-users home
lua-l archive

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


> Hmm. If I'm *not* using globals, can I assign nil to _ENV to get runtime 
> errors if I tyop the name of a local?

Yes.
 
> Is there any chance of a facility to produce *compile* time errors if my 
> code tries to reference globals?

See http://lua-users.org/wiki/DetectingUndefinedVariables for a patch to
the parser that allows you to do that. That page discusses other solutions.