lua-users home
lua-l archive

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


On Nov 19, 2007 6:27 PM, Humberto S. N. dos Anjos <h.anjos@gmail.com> wrote:
> - the debug library isn't used. The Lua manual recommends against it,
> because it can violate some Lua assumptions (local variables can't be
> accessed outside of their scope, numbers and functions can't have
> metatables),

On a tangent here, but I wasn't aware the second one was a fundamental
Lua assumption. You can change the metatable of base types easily
through the C API, I thought the only reason that numbers and
functions don't have one in the standard setup is it didn't seem
useful enough to bother (unlike strings), but it wasn't particularly
discouraged from being set up by Lua users through the API if they
wanted it. Am I wrong on that?