lua-users home
lua-l archive

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


Timur Davidenko wrote:
I`ll second that,
Ability to add custom metadata (or some kind of attributes like in C#)
That can be later accessed from C api.
Somehow like this:

SomeTable = {
	<UIType=int,UIMinRange=0,UIMaxRange=100>
	a = 1,

Sounds like metadata could be easily implemented as a table associated with an element of the table:

SomeTable =
{
   a = 1, Metadata_a = { UIType="int", UIMinRange=0, UIMaxRange=100 },
   etc etc
}

With the usual metatable trickery you can inherit and share metadatas across instances. Or am I missing something?

--
Javier Arévalo
Pyro Studios