Fwd: [Haskell] ANN: global-variables-1.0

Begin forwarded message:
From: Jean-Marie Gaillourdet
Subject: Re: [Haskell] ANN: global-variables-1.0 Date: 12. Oktober 2011 20:27:16 MESZ To: Henning Thielemann Hi,
On 12.10.2011, at 20:20, Henning Thielemann wrote:
On Wed, 12 Oct 2011, Jean-Marie Gaillourdet wrote:
* Simplify the "configuration problem" - at least for code in the IO monad.
Note, that this library does not encourage sloppy software design by re-introducing all bad effects of global variables.
But isn't this kind of solution for the "configuration problem" an example for sloppy software design? If a global configuration would be passed around, then you could easily use the program functions with different configurations simultaneously. In contrast to that, with the global IORef this is not possible.
Well, the question whether using a carefully documented set of global configuration variables which, e.g. only affect the verbosity of logging, is sloppy or not is a question I don't want to answer. But I am convinced there are good reasons to use global-variables *sometimes*. If only for a temporary debugging aid. In any case, an additional possibility to express design intents never hurts.
Note, that I wrote "simplify" not solve "the configuration problem" :-)
Cheers, Jean
participants (1)
-
Jean-Marie Gaillourdet