Lua method call sugar t:Test() vs t.Test(t)
🌙 Lua•Updated 2 days ago•0 views
Yes - obj:method(args) is sugar for obj.method(obj, args), so 'self' inside the function receives the table. Use the colon definition for methods.
Is t:Test(arg) the same as t.Test(t, arg) and does self still work
Yes - obj:method(args) is sugar for obj.method(obj, args), so 'self' inside the function receives the table. Use the colon definition for methods.