[Haskell-cafe] Order of Evaluation

Richard Kelsall r.kelsall at millstream.com
Sun May 11 05:28:50 EDT 2008

Miguel Mitrofanov wrote:
>> As I understand it Haskell does not specify an order of evaluation
>> and it would therefore be a mistake to write a program which relies
>> on a particular evaluation order. This is the 'unsafe' aspect of
>> unsafePerformIO.
> Hmm... IMHO unsafePerformIO is 'unsafe' because it can lead to type 
> errors in runtime. At least, that seems to be much more dangerous.

Oh yes, quite right.

This and especially the wicked unsafeCoerce seem like great ways
to shoot myself in the foot and are strong candidates for inclusion
in entries to the International Obfuscated Haskell competition :)



More information about the Haskell-Cafe mailing list