[Haskell-cafe] Re: [Haskell] Top Level <-

Bulat Ziganshin bulat.ziganshin at gmail.com
Thu Aug 28 04:20:04 EDT 2008


Hello Lennart,

Thursday, August 28, 2008, 12:00:41 PM, you wrote:

> I'm certain you can write a kernel in Haskell where the only use of
> global variables is those that hardware interfacing forces you to use.

moreover, you can write it in Turing machine. the question is just how
comfortable it will be :)

having an experience of writing medium-size "real-world" app, i have
to say that global vars make life much easier - it's a pain to pass
all the refs across all the function boundaries. OTOH they are
headache - the only parts of program that can't be instantiated many
times in concurrent threads are those using global vars

so, for me global vars is a must - sometimes you just don't have time
budget to make aesthetic design and anyway adding a lot of vars to
every function you wrote doesn't look very beautiful. OTOH it's better
to limit their usage, but this decision should be made by user, not
enforced by language. at practice, ghc already provides the way to
make global vars, we say only about making this feature simpler and
more standard


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list