lua-users home
lua-l archive

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


On Tue, Oct 18, 2011 at 9:33 AM, Josh Simmons <simmons.44@gmail.com> wrote:
> Interestingly enough this is actually worse if you use module and they
> both name themselves 'dns' in which case the value of the global just
> depends on who got in last.

This is true, but it's more a social problem. Sean's solution seems a
little extreme but at least he takes namespacing seriously!  And we
can always just ignore the global ;)

Personally, I'd declare myself as agnostic on the module() question.
It's dangers have been oversold, but personally I use the no-magic
style in public projects because then the code can integrate with any
other style, including sandboxed code.

(Moving Penlight away from module() was not trivial - can't do this
without a lot of tests, and the last problems only disappeared when I
started to use a global-checking script)

steve d.