Re: Ideas about colon operator syntax (and a patch in the work)
[
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: steve donovan <steve.j.donovan@...>
 
- Date: Fri, 2 May 2014 19:04:50 +0200
 
On Fri, May 2, 2014 at 5:41 PM, Thomas Jericke <tjericke@indel.ch> wrote:
> We have statements like:
> Module.Portal.Cmd.MoveXY(12, 24)
> Module.Head.Cmd.Pick()
> Module.Portal.Cmd.MoveXY(5, 22)
> Module.Head.Cmd.Place()
> ...
> over and over again and often the shortcut:
> local MovePortal = Module.Portal.Cmd.MoveXY
> MovePortal (12, 24)
> is used to call MovePortal without any table lookups involved.
>
> I am actually very satisfied with this solution,
> and of course I can't change that anymore now without braking all
> the scripts already written like this.
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).
- 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