lua-users home
lua-l archive

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


Hugo Etchegoyen <hetchegoyen <at> hasar.com> writes:

> 
> 
> Version 2.01 of the
> multiple-inheritance class library for Lua has been released. 
> As the previous version, it offers a class framework along the lines of
> C++, including multiple stateful base classes (not just interfaces)
> plus shared (C++ virtual) derivation.
> This version supports named classes and using the dot notation for
> scoping, and is backwards compatible with the previous 1.03 version
> which only supported unnamed classes and square-bracket scoping.
> Example of the new style with global named classes and dot scoping:
> require
> 'classlib'class.Account()  

For those of use running 5.1.1 with LUA_COMPAT_VARARG undefined
need a simple patch to take that into account:

function mt:__call(...)

	local arg = {...}

	-- Create a new class
	...
end

- Eric