[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Uncommon OOP in Lua: right or wrong?
- From: Rebel Neurofog <rebelneurofog@...>
- Date: Fri, 24 Sep 2010 22:44:38 +0400
Thanks a lot!
> http://www.lua.org/pil/16.4.html
local self = {
balance = initialBalance,
LIM = 10000.00,
}
Why put all these variables into table?
> Nothing wrong with it, using closures is a fine, if expensive, way of doing things.
Expensive for memory and cheaper for speed.
I think, this is cool alternative to 'object:method (args)' stuff.
Anyway, shouldn't it be at http://lua-users.org/wiki/ObjectOrientedProgramming