[Haskell-cafe] Re: Global Variables and IO initializers

jeff at inf.ed.ac.uk jeff at inf.ed.ac.uk
Mon Nov 8 18:32:38 EST 2004


Quoting Peter Simons <simons at cryp.to>:

> jeff  writes:
>
>  >> Just ask the C++ folks about the wonders of global
>  >> variables that are actually complex classes with a
>  >> constructor and a destructor.
>
>  > You can't use that as an argument against global
>  > variables in other languages.
>
> Why not?

So what if there are problems with globals that are actually
complex classes etc in C++?

Why should that matter to anyone using any other language?

> Does the creation of global variables never fail in
> Haskell?

That's a different argument, not based on C++.

> Besides, my main point is that they are
> _unnecessary_ in my experience,

Ok, but that's again not the C++ argument (which was all that
I was addressing).

-- Jeff


More information about the Haskell-Cafe mailing list