lua-users home
lua-l archive

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


On Thu, Jul 13, 2017 at 3:48 PM, Dibyendu Majumdar
<mobile@majumdar.org.uk> wrote:
> Actually OO is essential tool for organizing large code bases. I am
> not talking about inheritance and all - but just the ability to
> organize your code into objects of different types. Remember objects
> carry state.

We used to do that in C just fine ;)  It's a useful set of ideas, but
when it becomes a dogma and its meaning gets fossilized into whatever
the 'class' statement does, then it ceases to be so useful and spawns
its own pathologies, like the 'fragile base class problem' etc.

I've noticed this issue play out with Rust, which also does not have a
'class' concept. People have to wake up from their OO slumbers and
remember important distinctions between interface and implementation
inheritance etc.

This can easily stray too far from our topic, but I'm happy that Lua
does not have a class keyword. I learned that closures are so often
what we need.