lua-users home
lua-l archive

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

On 1/14/08, Luís Eduardo Jason Santos <> wrote:
> OOP is just too messy, too complex a problem to fit this definition. It
> should be a *use recommendation*, not a language construct. And s such,
> should come in several flavors.

i didn't want to say that, partly because it could easily degenerate
into a religious war; and also because everybody that's asking for OOP
have obviously made his/her mind on this subject, and if somebody just
disregards it, then the rest of the comment is ignored.

i don't think OOP isn't useful, it's of course overrated, but it's
certainly a neat abstraction for many problems.


when somebody say "but lua doesn't have objects!", and the answer is
"build your own!", they go on and build something big and bloated.
why? i think that's because they're trying to bring in all everything
that their favourite language does.


when a given abstraction is included into the (relatively slow moving)
core language, it _have_ to be all things to all people.

when it's just a code writing convention (like how the obj:mth() sugar
encourages), it can be really really simple when you don't need extra
bells and whistles.  just creating a fixed metatable with __index=(the
module table) is enough for a huge number of projects.

'blessing' a given class package would be nice for some projects, but
irrelevant for the vast majority of them.