[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Cryptic OOP syntax
- From: Mark Hamburg <mhamburg@...>
- Date: Wed, 26 Jan 2005 18:41:46 -0800
What do you mean by "putting OOP in the core"?
Lua already has the polymorphism aspect of OOP fairly well handled.
Inheritance is handled fairly cleanly in most of the OOP implementations for
Lua so long as you don't want to make calls up the inheritance chain (i.e.,
you don't care about super). Super calls can be handled just like in C++ and
Python and those pass OOP muster with at least some people, so even this may
be a non-issue.
Encapsulation is complicated to achieve. There are work arounds (I posted
one to the Wiki this morning), but none of them are perfect. But
encapsulation is arguably more about modularity than it is about OOP. For
example, my ideal answer to encapsulation would probably be to introduce
some form of private key declarations within modules together with ways to
keep them private.