lua-users home
lua-l archive

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

<warning pov="personal">

in dynamic languages, OO frameworks tend to be 'shallow' (not too many
levels of inhenitance) and often without a single root.  if you find
yourself implementing a big library in your root object, it probably
means you don't really feel comfortable with the language.

it's worth noting that most of us have at some point written some OO
framework, most of those get abandoned a few months later, when we
come to embrace a lighter, less class-based style.  Remember, OOD is a
style, not a language feature.

in my case, my objects tend to be just the encapsulation of state and
a few convenience methods.  polymorphism is only incidental,
inheritance is a _very_ rare sighting.  for that, you don't need any
framework, just a few repeating patterns to make it easy to read the
'hand crafting' of classes.


The big exception I can think of here is a GUI written in Lua since there's typically a large amount of state and several levels if inheritance. Otherwise I agree.