On 8/4/05, Till Mossakowski <[EMAIL PROTECTED]> wrote: > Remi Turk wrote: > > MonadState needs multi-parameter type classes, State and StateT > > don't. And ST needs rank-2 types (or at least one rank-2 > > constant) and, to be implemented _efficiently_, also needs > > something like unsafePerformIO (or even lower-level unsafe > > mutable state primitives). > > > I think one could call the ST monad a safe yet still efficient > > variant of unsafePerformIO + IORef's + IOArray's. > > No, the point of ST is that it is safe (as opposed to unsafePerformIO), > but still has the advantages of being both efficient and allowing > purely functional encapsulation via runST (as oppesed to IORefs > and IOArrays). The only price is that you need rank-2 polymorphism > and new language primitives for creating, reading and writing > references. But using these primitives is much better than using > unsafePerformIO - the latter entails a lot of harmful things.
Hmmm... Wasn't that what he said? /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 _______________________________________________ Haskell mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell
