> So maybe, as you say, uniqueness typing would be useful in Haskell.
> It seems to give Clean a speed advantage for number/array crunching at
> present (or so I've heard, though I must confess I've never tried it
> in either language).

Unique types do not provide any efficiency advantage over a monadic
approach to arrays or other mutable data structure.  Both approaches
allow one to express the single-threaded property needed to allow
in-place update, and thus this is not typically called an "optimzation"
since no analysis (other than type inference) is needed to enable it. 
More at issue is the style of program that results, and there are pros
and cons to this.  If Clean has faster arrays than monadic arrays in
Haskell, it is probably due to other issues, such as laziness.

A connection between linear types (the basis of unique types) and monads
can be found in the paper:
  http://www.cs.yale.edu/~hudak-paul/hudak-dir/popl97.ps

  -Paul



Reply via email to