[Haskell-cafe] global variables

Adrian Hey ahey at iee.org
Sun May 20 10:24:23 EDT 2007

[cc'ing HPrime]

Isaac Dupree wrote:
> The unsafePerformIO hack being used is not very satisfactory given how
> many optimizations make it difficult to use safely in practice.  This
> hack is also used many places.  I would be happier if that situation
> were not true, and I suspect there's something like a consensus on
> _that_. (maybe not as strong as "_needs_ a solution" in the short-to-mid
> term future)

Considering the value that the Haskell community normally places on
sound semantics, reliance on such an appalling hack seems pretty bad to
me. If a solution doesn't find it's way into H' then how many more years
is it going to be with us? It's just embarrassing :-)

Also, I don't know if the OP was a noob, but telling people (especially
noobs) that if they can't figure out how to solve a problem without
using a "global variable" then that must be down to inexperience and
general cluelessness on their part just seems wrong to me. It simply
isn't true.

(Anyone who disagrees with this should feel free to submit the patches
needed to fix up the base package :-)

Adrian Hey

More information about the Haskell-prime mailing list