[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Modules that are functions
- From: Petite Abeille <petite.abeille@...>
- Date: Thu, 21 Nov 2013 23:20:01 +0100
On Nov 21, 2013, at 10:59 PM, Marc Lepage <mlepage@antimeta.com> wrote:
> Is a module that is a function (not a table) a reasonable thing?
Sure, why not.
> Is it a common idiom (in this case)?
...
> Are there alternatives?
A callable table, i.e. one with a __call metamethod:
http://lua-users.org/wiki/FuncTables