lua-users home
lua-l archive

Re: Proposal: a new __key metamethods for tables and userdata(s)

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


2013年11月4日 David Demelier <demelier.david@gmail.com>:
> I propose to add a __key metamethod that the Lua VM use to index a
> table, this metamethods should just return any value (except nil of
> course) to index a table.
Why can't you just do this by writing __index and __newindex
with enough attention to detail?

AltStyle によって変換されたページ (->オリジナル) /