lua-users home
lua-l archive

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


On Thu, Feb 25, 2010 at 12:03 AM, David Manura wrote:
> The _ENV or in/do proposals eliminate that restriction, at least on blocks

Or handled in expressions sort-of too, as Roberto suggested:

   local o = with(shape)(function(_ENV) return rectangle { point(0,0),
point(3,4) } end)

   local one = module("one", _G, function(_ENV)
    local x = 1
    function a() print(x); x=x+1 end
   end)