On Wed, 31 Oct 2007 14:17:13 +0000
Jules Bean <[EMAIL PROTECTED]> wrote:

> Specifically, clean's uniqueness types allow for a certain kind of 
> zero-copy mutation optimisation which is much harder for a haskell 
> compiler to automatically infer. It's not clear to me that it's
> actually worth it, but I think that's the point at issue. I can
> *imagine* algorithms in which copying is actually faster than
> mutation, if copying gives you better locality.

If you want in-place update in Haskell, you can use the ST monad, or
IORefs. Yes, you have to refactor code, but anecdotally, uniqueness
types aren't without problems either - you can make one small change
and your code no longer satisfies the uniqueness condition.
-- 
Robin
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to