lua-users home
lua-l archive

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


It's probably best not to think in terms of inheritance. Think in terms of of standalone objects built from a combination of a table and a metatable. Metatables are designed to be shared across instances so that one can put a certain amount of shared material there and avoid the costs of full object replication, but it isn't really an inheritance system.

It's taken a while for me to get that viewpoint through my head given years of programming in inheritance-oriented languages.

Mark