lua-users home
lua-l archive

Re: Dynamic method dispatching

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


On Wed, Dec 22, 2010 at 15:14, Ronald Lamprecht <R.Lamprecht@t-online.de> wrote:
> The most perfect solution would be if v:name(...) would be syntactic sugar
> vor v.name(v, name, ...). But I guess this would cause major trouble and
> incompatibilities.
Could you use:
local v = myobj
local name = 'mymethod'
v[ name ]( v, ... ) ?
--rb

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