lua-users home
lua-l archive

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

2009/10/25 David Given <>:
> If you want to deal with object-oriented data structures in Lua, your
> best bet is to build your own rather than trying to extend tables like
> this --- less problematic. (This is one of the places where Lua's
> non-object-oriented philosophy really shows through.)

I think the good advice is to use something more complex than simply
setting a metatable to a table and consider it an object. However you
don't have to do it yourself. The LOOP library [1] provides several
very complete object models to create table-based objects. And even if
you don't find the model matching your dreams, one of these is
probably a good starting point.