lua-users home
lua-l archive

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


> So can someone explain to me how metatables actually
> differ from tag methods? I'm not seeing it, I see
> metatables as tag methods with some changes to the
> method names, or additions like "call".

It is not that different. The main difference are about how tag
methods are stored and manipulated. In w4, tag methods are stored
in regular tables, and each table/userdata has a "metatable"
with its tag methods, instead of a tag. After you set the tag methods
for an object, the actual behavior is quite similar to Lua 4.0.

> ("call" could actually be useful to me, but not too important)

"call" is not an adition, it's only a new name for "function".

-- Roberto