On Thursday 28 December 2006 12:53 am, Jimmie Houchin wrote:
Well, I basically am referencing comments about everyone rolling their
own flavor of OOP in Lua. (SWIG thread)
How important OOP is to Lua I cannot say. But for many it is their
preferred programming paradigm. And since Lua does support OOP, there is
no reason to not do it consistently and well. If I misread the roll your
for most people, OOP means encapsulation, polymorphism and inheritance.
the first two are so trivial to achieve that it's (IMNSHO) silly to try
to 'standardise'. rolling your own means only think that way when coding.
inheritance is the almost-missing piece, and here is where most people find
themselves doing all kinds of kludges, and/or inefficiencies.
but, at the same time, most of these schemes are interoperable, just because
of using the same syntax.
myself, i've found that sometimes it's nice to think in objects, but i've
never (NEVER) found myself using inheritance when not using C++. why?
simple, because in dynamic languages the polymorphism is so much more
flexible that it's not needed!