On Thu, 2011-12-29 at 21:04 +0000, Steve Horne wrote:
> AFAIK there's no hidden unsafePerformIO sneaking any entropy in behind
> the scenes. Even if there was, it might be a legitimate reason for
> unsafePerformIO - random numbers are in principle non-deterministic,
> not determined by the current state of the outside world and
> which-you-evaluate-first should be irrelevant.

This is certainly not legitimate.  Anything that can't be memoized has
no business advertising itself as a function in Haskell.  This matters
quite a lot... programs might change from working to broken due to
something as trivial as inlining by the compiler (see the ugly  NOINLINE
annotations often used with unsafePerformIO tricks for initialization
code for an example).

-- 
Chris Smith


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

Reply via email to