[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Easy object slot access in 5.2
- From: Tony Finch <dot@...>
- Date: Sat, 19 Nov 2011 16:40:46 +0000
So you don't have to write self repeatedly in methods, you can write:
function myclass.mymethod(_ENV, arg1, arg2)
slot1 = arg1 + arg2
slot2 = arg1 - arg2
end
This requires you to import all the functions and modules you use into locals so they can be accessed as upvalues.
Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/