lua-users home
lua-l archive

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


Hi Ousmane Roland Yonaba

Thank you for good recommendation.

middleclass has so many watches, stars and forks

Let me look into it also.

And the 30log is interesting - it gives me a question why you want it to be only 30 lines. You know it is now 31 lines ^^; one line to be removed?

I will look into those.. Thank you very much.

Sincerely
Journeyer


----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l  d o t  c o m
----------------------------------------


2014-02-24 2:12 GMT+09:00 Ousmane Roland Yonaba <roland.yonaba@gmail.com>:
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/


On Sun, Feb 23, 2014 at 5:10 PM, Ousmane Roland Yonaba <roland.yonaba@gmail.com> wrote:



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/