lua-users home
lua-l archive

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


Tim Hill <drtimhill@gmail.com> writes:
> However, it seems to me that there is one hole in this clean model:
> the inability of a metatable to project a "type" into the Lua code
> space.
...
> Thoughts anyone?


I think the entire concept of a "type()" function is sort of fragile,
and really not what you want as a general interface.

Something like type predicates would be much better.  So the trick is,
assuming a standard set of type predicates, how do you extend them to
work on user types?

-Miles

-- 
Carefully crafted initial estimates reward you not only with
reduced computational effort, but also with understanding and
increased self-esteem.         -- Numerical methods in C,
  Chapter 9. "Root Finding and Nonlinear Sets of Equations"