[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ideas about colon operator syntax (and a patch in the work)
- From: "Thomas Jericke" <tjericke@...>
- Date: Fri, 02 May 2014 21:09:57 +0200
-----Original Message-----
> From: "steve donovan" <steve.j.donovan@gmail.com>
> To: "Lua mailing list" <lua-l@lists.lua.org>
> Date: 02-05-2014 19:05
> Subject: Re: Ideas about colon operator syntax (and a patch in the work)
>
>
> That seems a fair solution, for the situation you have. Providing a
> scripting interface is a decision that only you can make. No one
> would dispute that.
>
> However, it's not a universal solution to Lua OOP, because of the
> overhead (all objects must contain all the needed closures).
Actually I use userdata with metatables, not closures.
I think I should do some measurements on the run time overhead,
but I don't think it's that much. In both cases you need at least
one table lookup and one function call.
As I have a userdata, storing the reference is just sizeof(void*) per
method/object instance.
--
Thomas
- References:
- Re: Ideas about colon operator syntax (and a patch in the work), Michael Richter
- Re: Ideas about colon operator syntax (and a patch in the work), Thomas Jericke
- Re: Ideas about colon operator syntax (and a patch in the work), Dirk Laurie
- Re: Ideas about colon operator syntax (and a patch in the work), steve donovan
- Re: Ideas about colon operator syntax (and a patch in the work), Thomas Jericke
- Re: Ideas about colon operator syntax (and a patch in the work), steve donovan
- Re: Ideas about colon operator syntax (and a patch in the work), Thomas Jericke
- Re: Ideas about colon operator syntax (and a patch in the work), Dirk Laurie
- Re[2]: Ideas about colon operator syntax (and a patch in the work), Thomas Jericke
- Re: Re[2]: Ideas about colon operator syntax (and a patch in the work), Dirk Laurie
- Re: Ideas about colon operator syntax (and a patch in the work), Thomas Jericke
- Re: Ideas about colon operator syntax (and a patch in the work), steve donovan