lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thursday, January 4, 2001, at 10:49 AM, rjek@digital-scurf.org wrote:

> On Thu, Jan 04, 2001 at 10:44:11AM -0800, Steve Dekorte wrote: 
> >  
> > If you're doing OO programming in lua, this isn't a problem: 
> >  
> > local myObject = {} 
> >  
> > function myObject:foo(bar) 
> >   ... self:foo(bar2) ... 
> > end 
>  
> Doing this is a bit of overkill, if the 'class' in question only has one 
> method, and no externally accessable variables. 

I agree, but chances are that whatever your function is manipulating has
other functions that manipulate it which can be collected into a proper object.

Steve