
Alastair Reid
I'm glad to hear there isn't a _serious_ cost (i.e. performance penalty) for fine-grained hierarchies.
One cost which doesn't seem to have been mentioned is the programmer cost.
With the current Haskell Prelude, a matrix operation (say) might have type:
invert :: Num a => Matrix a -> Matrix a
but, if we had one operation per class, the type might be:
invert :: (Add a, Subtract a, FromInteger a, Eq a, Multiply a) => Matrix a -> Matrix a
More flexible but quite unwieldy.
IIRC, Clean essentially has this. Though it's more like invert :: (+ a, - a, FromInteger a, = a, * a) => Matrix a -> Matrix a (I may be wrong about the syntax and the specifics :-) - Hari -- Raja R Harinath ------------------------------ harinath@cs.umn.edu