lua-users home
lua-l archive

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

Code using metatables looks freighting, major reason are the
underscores. In C underscores usually highlight "compiler specific
extension" or "dirty hack using clib internals", where this scary look
is well justified. Metatables are a seperate namespace from the table,
so what should the underscores protect against? Sure there are those
hacks, where a table is a metatable to itself, but when you expect
"index" or so to be normal keys for that table, just dont do that kind
of hack. Wouldn't code be shorter and better looking without __ for
any content of metatables? My guess that newbies are so freightened
from metas is just exactly the __syntax.