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

Adrian Hey ahey at iee.org
Mon Nov 8 15:14:44 EST 2004


On Monday 08 Nov 2004 12:23 pm, Lennart Augustsson wrote:
> Adrian Hey wrote:
> > 4- They already exist (stdin,stout,stderr) and I don't
> >    recall anybody ever complaining about this.
>
> stdin, stdout, and stderr are not global variables.
> They are just handles.

Isn't an IORef just a "handle" for a mutable variable?

They are all top-level TWI's, and I don't see why one form
should be regarded as completely acceptable while another
should be avoided at all costs.

And I don't understand the relevance of your argument
about the IO monad. I hope you don't think anybody
is suggesting that reading and writing IORefs outside
of the IO Monad should be allowed. That is not what
this thread is about.

Regards
--
Adrian Hey



More information about the Haskell mailing list