[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Modules, interafaces
- From: Rebel Neurofog <rebelneurofog@...>
- Date: Tue, 10 Apr 2012 18:33:38 +0400
> ---------------------------------
> M.wonder = function(s) --M from above
> return aux(s).."?" --aux from above
> end
> ---------------------------------
By putting "?" into M or by implementing get function to access upvalue(s).
Sometimes implementing set/get pair for every piece of data is worth it anyway
(e. g., in widget system), sometimes it's just an overhead.
Several upvalues may be packed into single table like:
M.private = {a = b, c = d, e = f}
or accessed by single function:
function M.get_stuff ()
return b, d, f
end