lua-users home
lua-l archive

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


On Mon, Jan 17, 2005 at 03:22:39PM +0100, Klaus Ripke wrote:
> ``Real?? OO languages do not have any concept of protected,
> it's just a workaround as broken as e.g. C++ multiple inheritance.
> It's like "which part of ``private?? didn't you understand"?
> A subclass is just a client like anything else, and there's
> perfectly no reason why it should have special privileges.

Java code often uses protected abstract methods for functionality that
is to be provided by a subclass, but is not part of the external
interface. That seems like a pretty legitimate use (and the only one
I've noticed) but as usual it's only because Java is so braindead. In
Lua (or C++), I'd make the missing function a class parameter.

-- Jamie Webb