lua-users home
lua-l archive

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

On Mon, 2005-01-17 at 09:02, Gunnar Zötl wrote:

> I'm all in favor of keeping the "self" notation. And I think that one
> OO system to rule them all is not necessarily a boon for lua. As other
> people have written, the power of lua comes from the meta-programming,

Actually, I think it comes from supporting a few high level
constructions such as first class functions, tables, and coroutines.

The meta-programming stuff is actually a hack to replace
real polymorphism which doesn't make much sense in a dynamically
typed language.

That is, the main use of it is to provide syntactic sugar,
which you'd use a type system for in a statically typed language.

Tread warily, since object dispatch, including meta-methods,
can't handle covariant operations such as addition .. one
of the things Lua and Python actually try to use it for.

John Skaller,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language