Jonathan Cast wrote:
This has been answered repeatedly, at least implicitly.  Unless you
insist that getWhatever should live in the IO monad and have no
functional arguments (why?), there is no reason why this should be
impossible.

What's more, there seems to be no good *semantic* reason why this should
not be possible. The only objections seem dogmatic to me.

I haven't seen you give a non-dogmatic reason for wanting global
variables yet, either.

You consider real examples from real *standard* libs that we're all using (and presumably not written by clueless hackers such as myself)
to be dogmatic? I would call that pragmatic myself. These are the
standard libs after all. Shouldn't we expect them to be the perfect
examples of how to do things rite?

But even if someone does produce an entirely unsafePerformIO hack
free set of standard libs, I have to ask why jump through all these
hoops?

To improve the APIs available?

There's nothing wrong with the APIs as they are as far as I am
concerned. It's their implemenation that's the problem.

 You're advocating an extension to a
*purely functional programming language*.

So? What's being proposed doesn't compromise referential transparency
(at least no more that the IO monad already does, as some might argue).

There's no semantic difficulty with the proposed language
extension,

Although I've noticed it's grossly under-powered compared to what's
needed to implement stdin the way you want to.

Can't recall expressing any opinion about how stdin should be
implemented so I don't know what your on about here.

Regards
--
Adrian Hey







_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to