[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: override assignment operator
- From: joao lobato <btnfdp.lobato@...>
- Date: Wed, 18 Jan 2012 21:34:42 +0000
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.