lua-users home
lua-l archive

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


So realistically, if you want (non-mutable) userdata to be equivalent in
the sense of builtin object types, you need to implement some kind of
weak-reference system to avoid creating new userdata if an equivalent
one exists already, in which case you don't need to implement the eq
metamethod anymore, since they will BE the same userdata if they
satisfy "equivalency" rules.

Sam