[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: experience implementing a module system
- From: "John Belmonte" <jvb@...>
- Date: Wed, 3 May 2000 10:01:35 +0900
Edgar Toernig wrote:
> I made a patch for lua 4.0a that allows upvalues to access locals in outer
> scopes. Semantically it does just what you did by hand, that is inserting
> a "local foo=%foo" (but without actually creating the intermediate local).
> Everything else stays the same. You can find the patch at
> I ask the designers to look at the patch and include it into the final 4.0
> version. It's fully backwards compatible, makes the upvalue handling more
> orthogonal, fits pretty well into the parser, and removes this annoying
Speaking of orthogonal handling and upvalues, I would like to use the
upvalue syntax in the global scope. Combined with your patch I could just
write %var everywhere without having to think about what scope I'm in.