News for hackers. Stuff that matters.
Re:Why Not Haskell? by jerf on Tuesday October 18, 2011 @01:08PM (#3126001)
You have to get the randomness out of IO, because referential transparency and randomness of any kind (psuedo or otherwise) are fundamentally in opposition, but once you have the random source in hand, you can use it any way you like in otherwise pure code. The Random support in Haskell is set up to permit and to some extent support this usage, with the ability to "split" a random generator into something you use now and something you pass along. After that it's your responsibility to properly split & use, but I haven't yet found it to be a big problem in practice.

There are no comments on this comment yet.