4 ms·
Indeed, you are correct. function obj:method(arg) .. end is the same as function obj.method(obj,arg) .. end I think the reason I mentioned the latter is
by bayareaguy 18y ago
Indeed, you are correct.
function obj:method(arg) .. end
is the same as
function obj.method(obj,arg) .. end
I think the reason I mentioned the latter is I generally use Lua closures to code the way Eckel preferrs.
"Objects are a poor man's closures" -- Norman Adams