[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Overdoing 'local' (Was: [ANN] luaposix 33.4.0 released)
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 29 Feb 2016 14:12:48 +0200
On Sun, Feb 28, 2016 at 11:53 AM, Nagaev Boris <firstname.lastname@example.org> wrote:
> local conman = require "org.conman"
> Just one local variable.
Someone is going to say "but then you have to pull all the libraries
in!". Not necessarily. With a little bit of metamethod magic on
conman, can load submodules only when accessed.
> The global namespace was created to be polluted and the locals were
> created to keep things clear.
Well said. Putting stuff in globals is not necessarily evil; we let
stock Lua do that ;)