lua-users home
lua-l archive

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


I implemented a class system with abstract methods but not multiple inheritance. Structural subtyping between parent and child classes is enforced by a type checker that I wrote. I'll admit that it's pretty weird; because abstract methods require no function implementation, I  represent them syntactically using empty table constructors, with type annotations included in comments.

The class system is described here: https://bitbucket.org/kevinclancy/basic-class-system/wiki/Home.

Because an abstract class is basically a type definition, and because lua is a dynamic language with no facilities for defining types, I think you're unlikely to find many OOP libraries supporting abstract methods.

Kevin
On 5/16/2013 2:50 AM, Muqtheear S wrote:
Hi all,
        Please suggest me a Lua OOP library which should support Abstract classes along with some basic feature as well.

Thanks & Regards,
Muqtheear.S