lua-users home
lua-l archive

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

On 31/01/2011 13.33, steve donovan wrote:
After all, it's such fun to do our own; sometimes I think this was a
lost opportunity.  A straightforward metatable-based OOP scheme is
maybe a hundred lines of code, which hides the 'uncomfortable' stuff
and puts it behind a 'standard' facade.  If such a little module were
included in the Lua 5.1 distribution (like strict.lua) then perhaps we
would not have such fragmentation.

Probably not, but there could be a cost: people would start building around this 'standard' OO and pretty soon our beautiful swiss-army knife of a language could feel cast in concrete and become as unwieldy as, say, Java.

Besides, not everyone needs formal OO (I can usually live without it, for example), so I'd keep such code neither in the distribution nor in a standard library (where it could do great damage by imposing an 'ideological' view), but in an external add-on library. Just as Unicode strings, sockets and other features that can be invaluable to somebody and useless to others.