[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Concerns regarding in env do code() end
- From: Duncan Cross <duncan.cross@...>
- Date: Fri, 15 Jan 2010 01:04:20 +0000
On Fri, Jan 15, 2010 at 12:30 AM, David Given <firstname.lastname@example.org> wrote:
> Actually, what I'd really like is a syntactic construction indicating
> that a particular lexical scope has *no* environment and any use of
> globals is therefore an error and should error out at compile time.
> local a = 1
> in nil do
> a = 2 -- works
> b = 3 -- fails at compile time!
Couldn't nil conceivably have __index and __newindex metamethods at
run time, and therefore this would *have* to compile?