lua-users home
lua-l archive

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


On Sun, 23 Apr 2006 12:28:32 +0300
Asko Kauppi <askok@dnainternet.net> wrote:

> I am still puzzled by this area, after 4 years with Lua (I know how  
> the things work, but would like to have a "require 'classes'" kind
> of approach, One Size Classes for those just wanting to get basic  
> inheritance etc. without paying much attention to how it's done. Am
> I alone? :)

I totally agree here. From time to time, discussions arise on the Lua
list about one or another class implementation -- and it always looks
like everyone is crafting his/her own class system (I even made more
than one implementation, just for testing!). I strongly believe that
having a "standard" class system would greatly improve reuse and
interoperability of Lua code. I think it also would/should encourage
a consistent way of making object-oriented bindings of non-Lua code.

But the task of designing such a thing is not effortless if we take
into account one of the principles of Lua: give mechanisms, not policy.
Like the new module system introduced with Lua 5.1 (which I find great)
the "standard" implementation for classes would need to impose some
policy -- but the gains can be more than the (possible) loss of coding
freedom.

Just my 2 cents ;-)

-- 
Adrian Perez
"Experience is what you gen when you don't get what you want"
                                           -- (Dan Stanford)



-- 
Adrian Perez
"Experience is what you gen when you don't get what you want"
                                           -- (Dan Stanford)

Attachment: signature.asc
Description: PGP signature