[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Local table
- From: Nick Trout <ntrout@...>
- Date: Mon, 27 Jan 2003 12:05:45 -0800
What do people think of the idea of having a locals table? I havent made the
leap to Lua5 yet. I've been trying to follow various threads though.
In Lua, you can do meta method stuff on globals and tables but not locals
(please correct me if I'm wrong). It would be fairly easy to retrieve locals
and put them in a table (I think the debug library allows this). I'm not
sure how meta methods would work with this. If locals returned a table of
local variables, could you apply metamethods to the table until the scope
expired? eg. It might be useful for a debugger if you could read locals and
monitor writes to them.
Nick