Fawzi Mohamed [EMAIL PROTECTED] writes:
Vectors don't act like numbers, a vector space is not a
field, even if they have some common operations.
That's a long-standing flaw in the design of numeric
classes. It's not a problem with typeclasses per se.
I find it misleading to define something a number when it
does not satisfy all the properties of numbers.
Justifiably so. But if you had a class Additive, would you
be unhappy about defining (+) on non-numbers?
The numerical prelude might fix this, but still I think that
class and overloading should be distinct concepts.
I think the problem here is that you are using the word
class to mean something different from Haskell
classes. Haskell typeclasses /are/ overloading, and that's
what I understand them as. They were originally introduced
as a solution to the question of how to handle equality so
that one didn't have to use different names for the same
concept on different types.
--
Jón Fairbairn [EMAIL PROTECTED]
http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html (updated 2006-09-13)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe