lua-users home
lua-l archive

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


>>> adrian_groups@sietsma.com 01/25/05 10:07AM >>>
>1/ Lua already supports (mimics?) OOP via the metatable / proxy table
>approach

Absolutely - and it works very well.  Most proposals involve
extra syntactical sugar, and Lua is very light on the calories!

>2/ A lot of OOP is about encapsulationg, hiding and protecting data,
>methods, etc., as well as the inheritance issues. This is all very
well,
>but Lua allows me to do things that are anathema to OOP, particularly
>adding new members to an existing object.

And why not?  Anathema to a particular OOP doctrine, perhaps.
Why impose Java/C++ styles on such a flexible language?

We can learn from the Smalltalk tradition, straight
or via Objective-C, but we don't have to pick up restrictive
attitudes in the process.

steve d.