lua-users home
lua-l archive

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

Mark Hamburg wrote:
> If module is going to keep doing a setfenv, then will people
> have any motivation to write "in module( ... ) do < statements >
> end" as opposed to just "module( ... ) < statements >"?

No, of course not. Christmas always comes as a surprise. :-)

Remember the complaints when "for i in table do" was deactivated
in Lua 5.1, even though it was already deprecated in Lua 5.0?

Similarly, I've gotten several complaints for removing the
old-style vararg "arg" table in LuaJIT. There's *a lot* of code
out there that mixes old-style and new-style varargs. And this is
really evil, because there is a global named "arg" by default. So
you often don't get an error, just an incorrect result somewhere
deep inside your code.

The public outcry about module() will happen with the release of
Lua 5.3 then. So we still have a couple of years to go ...