lua-users home
lua-l archive

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

On Mon, Jun 16, 2003 at 09:39:48AM -0300, Andre de Leiradella wrote:
> . explicitly calling inherited methods;
> . static properties;
> . static methods.

What's the problem with using, ...), and
Classname.baz(...), supposing you implement OO the usual way?


setmetatable(Foo, {__index=Bar})

    return setmetatable({}, {__index=Foo})

and so on.

I think having to explicitly give the class name is a Good Thing and so
is having to explicitly refer to objects variables (be it @ or self). 
Although I rather stick to simple languages and haven't used C++ and 
such much, I think implicit OO scope tends to make code hard to read. 
If I had to write C++, I'd be using some clsnm_ prefix for the variables
to keep things clean.