lua-users home
lua-l archive

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


2009/11/14 Peter Cawley <lua@corsix.org>:
> Lua doesn't have any class or inheritance system built in, so it'll be
> hard to give an answer without first knowing what implementation of a
> class system you are using.
>
> On Sat, Nov 14, 2009 at 9:17 PM, Colm Sloan <colmsloan@gmail.com> wrote:
>> In short, does anyone know the Lua equivalent of the C++ code:
>> DerivedClass d = (DerivedClass)baseClass;
>> ?
>> But only using Lua code, no C++.
>> The base class object already has loads of things in it that I need in the
>> derived class. I don't believe I can just use table.copy(t) because I don't
>> think that gets everything.

It also doesn't have a table.copy()...

Matthew

PS. Peter Cawley top-posting, what is the world coming to? :)