lua-users home
lua-l archive

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





On Sun, 23 Feb 2014 10:48:55 +0200, steve donovan <steve.j.donovan@gmail.com> wrote: 
On Sun, Feb 23, 2014 at 8:46 AM, Journeyer J. Joh
<oosaprogrammer@gmail.com> wrote:
> But yaci doesn't look like normal lua module.
> It just look like a code block exporting one global function and one table.

That's the joy and sorrow of Lua - it is a module, just not defined in
a common way. You look at the end of the file, and it says:

end -- 2 global things remain: 'Object' and 'newclass'

This is probably bad style, but it does work fine.  require 'yaci'
adds these new globals.

steve d.

  
Hi Joh,
As a followup to S. Donovan's comment, may I humbly recommend a few
alternatives, in case you still want to stick to a more "updated" Lua class
library ?
There's a ton out there, but I can definitely recommend MiddleClass[1],
which is Lua 5.1 and 5.2 compatible. It is quite solid, and extensible via
plugins.
Also, there is 30log[2], if you like tiny things. I am the author.

Roland.
[1] https://github.com/kikito/middleclass
[2] http://yonaba.github.io/30log/