lua-users home
lua-l archive

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

> Lua 5.0 will support this: tostring in the baselib will look at __tostring
> in an object's metatable and call this if set.

Excellent!  I had implemented that myself (I called it __typename, but
__tostring is probably clearer).  I was hoping you'd make it a function,
not just a constant string, as I use the same metatable for basically all
my classes in my application, using a dynamic dispatcher for calling
the appropriate code, so I need to be able to evaluate the name of
the type at run-time.

Thanks for this!

When will we b able to get an updated work, or alpha release of

Love, Light and Peace,
- Peter Loveday
Director of Development,
eyeon Software