lua-users home
lua-l archive

Re: override assignment operator

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


Actually, my second example is wrong.
With the closure method, counter:inc() should be counter.inc(); it
happens to work (fingers crossed here, I didn't test it... ) because
Lua is forgiving regarding function arguments.
counter:inc() == counter.inc(counter), "magic" first argument. Read
the Pil and explore the archives of this mlist.

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