lua-users home
lua-l archive

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


Implementing a type method for all classes seems like a sane solution
to this problem.

One concern would be primitives, which is solved by giving each
primitive a metatable. However, types such as full userdata and tables
each can have their own metatable so that creates a problem. I think
it would be useful if all types had a default metatable which would
provide us with facilities such as a type function (gotten via
__index).

-- 
-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."

-Will Durant