lua-users home
lua-l archive

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




On Thursday, February 27, 2014, Dirk Laurie <dirk.laurie@gmail.com> wrote:
2014-02-27 20:41 GMT+02:00 Andrew Starks <andrew.starks@trms.com>:

> Something like "type" is one of those things that I wish had a bit
> more policy around it.

Isn't policy something rather like house rules? Best defined and
practised by those that need it? No one size fits all?


That's something to ponder and there certainly are a huge number of threads on type. I'm sure that nobody in Brazil is slapping their forehead exclaiming, "ahh! Yes! We had never thought of adding user defined types!" (Or some other type related revelation)

Making up the language facilities that you need is part of what makes lua what it is. Adjusting to the handful of ways that people identify their table objects as various types is not too hard: __type, _type, _class , _name, etc.

It's one of those things that comes up and I have this thought. When I do, I'm never left thinking that there are a ton of ways to extend value types. I'm always left thinking, "any one of these ways would be fine and if there was just one, things could be much easier to parse."

Also, I'm more hoping that they (or someone on this list) come up with something cool. The stuff I'm doing is probably better left as a library extension. 

-Andrew