[Haskell-cafe] Building the community

J. Garrett Morris trevion at gmail.com
Thu Dec 14 00:52:47 EST 2006

On 12/13/06, Donald Bruce Stewart <dons at cse.unsw.edu.au> wrote:
>     *  Give tips on how to answer questions
>             + Ok. we can put up an article here. Some suggestions:
>                 - Solutions with unsafePerformIO should be discouraged (moreso ;)

I'd like to at least suggest a slight qualification here, based on
some personal experience.  A colleague of mine learned Haskell after
having spent a while doing systems programming, and (with the danger
of completely misinterpreting him here), the (perceived) lack of
unsafePerformIO et. al. led him to conclude that Haskell was a good
high-level language, but a certain number of projects would at least
require you to write a fair amount of your code in C.  Once he saw
some code that (safely) used unsafePerformIO - particularly in fps, as
I recall - he changed his mind.  To this day, he hasn't written any
code using unsafe*, but is generally somewhat more interested in

So, I'd suggest that demonstrating both the use of unsafePerformIO
when the question is obviously trending that way and mentioning why it
is a bad idea -- perhaps with an example of something that will
obviously segfault or otherwise break type safety - is sometimes a
better idea than simply not admitting its existence.

Also, I strongly support the necromancy/IO analogies.


It is myself I have never met, whose face is pasted on the underside of my mind.

More information about the Haskell-Cafe mailing list