lua-users home
lua-l archive

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

On Tue, Oct 5, 2010 at 8:50 AM, Thijs Koerselman
<> wrote:
> What is the most basic way to create a module with
> - no pollution of global namespace
> - no prefix required for methods to call each other inside module.
> - no deprecated functions
> ?

Concerning the second point, omission of the prefix can cause
difficulties. You're throwing not just locals and globals but also
module members into the same namespace, typically differentiating the
latter two only at runtime via some metamethod and some way of
handling name conflicts (e.g. debug.debug()).  [1]