[Haskell] Re: ST/STRef vs. IO/IORef

Wolfgang Jeltsch wolfgang at jeltsch.net
Fri Aug 5 05:52:01 EDT 2005


Am Freitag, 5. August 2005 08:04 schrieb Till Mossakowski:
> [...]

> I disagree with the equation "primitives = unsafe" that
> is implicit in sentence
>
>   to be implemented _efficiently_, also needs
>   something like unsafePerformIO (or even lower-level unsafe
>   mutable state primitives).
>
> The point is that ST uses *safe* primitives, and not "something
> like unsafePerformIO".

I think that the one which you cited refered to implementing the ST monad 
(which needs unsafe primitives, AFAIK) while you refer to implementing 
algorithms using the ST monad (which normally avoids unsafe primitives).

> [...]

Best regards,
Wolfgang


More information about the Haskell mailing list