lua-users home
lua-l archive

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


I guess one reason might be that obj.__index would give up your metatable, even if you have set the __metatable field?

Mike

Michael Broughton wrote:
You suggest that it is not a good idea to combine the metatable and method table for userdata. Is performance the only reason?

Sorry if I have been confusing terminology in my emails. I always combine the metatable and method table in my libraries. The third party Lua libraries I've looked at do this as well. So do the examples in PIL2.

Mike