lua-users home
lua-l archive

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


> Typical is *really* simple; on Lua values without a metatable, it just
> calls _G.type.  If the value has a metatable, it checks for a __type
> field in the metatable and uses that if found.  The typical library will
> also include some more utility functions.
>
> Obviously this is up to library and application developers to go along
> with, so I wanted to get the community's feedback on this.  Do you
> folks think this is a good or bad idea?  Any questions, comments, or
> suggestions?

I think this is a very nice idea.  Even if it doesn't become a
widespread thing, I could see it being useful from a "not having to
reinvent the wheel" perspective.  I could see extending the library to
include ideas from Julia about how types get annotated, relate to one
another, and are queried:

http://docs.julialang.org/en/latest/manual/types/
http://docs.julialang.org/en/latest/stdlib/base/#types

wes