[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: modules, require, magic
- From: Tony Finch <dot@...>
- Date: Wed, 19 Oct 2011 09:28:55 +0100
Hisham <firstname.lastname@example.org> wrote:
> For that reason, I think #5 produces the clearest programming idiom.
> Distinguishing private and public functions with "local function" and
> "function" is very logical, if you think of "module" abstractly, as a
> language feature.
One of the key goals of 5.2 is to put Lua's scoping on a more solid
conceptual foundation. Getting rid of setfenv except as a dirty debugging
feature is a key part of that.
Luiz's module pattern gives you 'local function foo" for private functions
and "function module.bar" for exported ones.
f.anthony.n.finch <email@example.com> http://dotat.at/
East Sole: Northerly or northwesterly 4 or 5, occasionally 6 at first. Rough
or very rough. Showers then fair. Good.
- modules, require, magic, Eduardo Ochs
- Re: modules, require, magic, Javier Guerra Giraldez
- Re: modules, require, magic, Petite Abeille
- Re: modules, require, magic, Sam Roberts
- Re: modules, require, magic, David Manura
- Re: modules, require, magic, Hisham