lua-users home
lua-l archive

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

On Mon, May 13, 2013 at 12:35 PM, Philipp Janda <> wrote:
But I admit that providing properties *and* methods for a userdata feels a bit clumsy. I usually set an index metamethod with the method table as an upvalue, and check the method table first and then look for properties in the userdata. Maybe we could add an API function to lauxlib to help doing something like this ...

Yes, I've found myself doing this as well, and I'm always aware that this is not going to be _fast_ ;)