Top Level TWI's again was Re: [Haskell] Re: Parameterized Show

Benjamin Franksen benjamin.franksen at
Tue Nov 23 07:19:14 EST 2004

On Tuesday 23 November 2004 09:10, Adrian Hey wrote:
> On Monday 22 Nov 2004 6:27 pm, Lennart Augustsson wrote:
> > Personally, I can't believe I hear people arguing for global variables.
> Oh dear, here we go again. I repeat, AFAIK nobody who wants a solution to
> this problem is advocating the use of "global variables"

I don't understand the difference between a "global variable"

(C code, outside main): int var = 0;

and a "top-level thing with identity"

(proposed Haskell code, outside main): var <- newIORef 0

AFAIK, "global" in C (or any other imperative language) means the same as 
"top-level" in Haskell.

Ceterum censeo: Global variabes are evil.

More information about the Haskell mailing list