[Haskell-cafe] Haskell vs GC'd imperative languages, threading,
parallelizeability (is that a word? :-D )
Andrew Coppin
andrewcoppin at btinternet.com
Fri Aug 10 13:37:31 EDT 2007
Stefan O'Rear wrote:
> Bool is 32 bits, but Don is using UArray. UArray is not parametric in
> the element type, which means it's less generally useful (no UArray of
> Complex Double, for instance), but conversely it is able to use more
> efficient representations depending on the type.
>
Would be nice if it *could* somehow be parametric... but I have
absolutely no idea how you'd do that. The transformation is self-evident
enough to a human, but how do you explain it to a machine?
(I somewhat suspect you'd have to bake this into the compiler itself it
you wanted *arbitrary* types. Otherwise you'd have to write some special
class that knows how to pack and unpack the data from the array, perhaps
as a bundle of Word8s or something? Doesn't sound hugely fast...)
More information about the Haskell-Cafe
mailing list