lua-users home
lua-l archive

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

"Eric Tetz" <> writes:
> 10 programmers contributing ten different OO schemes to a project,
> with 10 copies of similar yet incompatible code, to be distasteful

"incompatible"?  I'd say "compatible"...

Lua emphasizes _interfaces_, and packages in Lua tend to stick to them,
regardless of whatever other features they have.  This means that
different OO systems in Lua tend to mix quite happily.

A method call is always a:b(...), data access is always a.b, and this is
true regardless of what OO system is used.

This means you can even "rejig" objects after the fact, seamlessly.
E.g., I have a lot of "objects" created by SWIG, but sometimes I replace
them with wrappers in Lua that use a different OO system, because I need
some extra functionality -- and the code using these objects doesn't
even realize the difference.


Come now, if we were really planning to harm you, would we be waiting here,
 beside the path, in the very darkest part of the forest?