[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: a case for multiple environments - expressing modules more naturally
- From: David Manura <dm.lua@...>
- Date: Thu, 12 Aug 2010 23:01:34 -0400
On Tue, Aug 10, 2010 at 1:42 PM, Shawn Fox <shawnkfox@gmail.com> wrote:
> So based on this I think what I'm really asking for is that something like:
>
> foo = namespace
> local x = 99
> function bar(y) print(x+y) end
> end
which isn't too different from what I would recommend below, where f
could be various functions including `namespace` and `class` suitably
defined:
foo = f(function(M)
local x = 99
function M.bar(y) print(x+y) end
end)