[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN} Penlight 0.8 Beta Released
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 25 Feb 2010 13:47:51 +0200
On Thu, Feb 25, 2010 at 9:36 AM, Geoff Leyland
> It turns out this has been thought about before: http://lua-users.org/wiki/DetectingUndefinedVariables
> So, in the spirit of Lua, I read everyone else's and wrote my own.
Which of course is what I did ;)
> It's extra feature is that it overrides "module" and "setfenv". I didn't seem to run into trouble > replacing _M's __index - is that because I don't use package.seeall?
I'll have a look. If you did use package.seeall, then the undefined
lookup would go up to _G which would complain bitterly. So it works
What about the constraint that fields of _M may only be modified by
functions inside _M? That seems a good generalization.