lua-users home
lua-l archive

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


On Thu, Jul 15, 2010 at 8:18 AM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>> I think I like what Roberto Ierusalimschy is suggesting, assuming I'm
>> understanding it correctly. Here's how I see a "global" declaration
>> keyword working:
>>
>> [...]
>
> Your interpretation (so far, at least) is correct.

I may misunderstand but from his code:

>> a = 10;         --  a is a global (global assignment checking isn't enabled yet)
>> b = 20;         --  b is a global too
>>
>> global checks;  --  using the global keyword turn global assignment checking on.
                   --  "checks" is a global, but it's just a dummy in
this case and not used.

"global checks" as a statement doesn't "turn on" global assignment
checking? Global assignment checking would be always on? Or is this
simply how it works at the file chunk level? (Perhaps a new thread
discussing the new change is warranted like the earlier "a new
proposal for environments" thread. It would be most helpful to have an
authoritative description of the proposed design.)

-- 
- Patrick Donnelly