3 ms·
"I think there is also a good case for type classes not being reified as modules or dictionaries or objects or what have you: they essentially exist exclusively
by dan00 14y ago
"I think there is also a good case for type classes not being reified as
modules or dictionaries or objects or what have you: they essentially
exist exclusively at the type level. That is, the instances are a property
of each type, not part of a module or anything like that. This also makes
the syntax for types clearer: the => acts as implication and the type
class acts as a predicate on the type."
Yes, redefinable instances of type classes feels a bit like monkey patching.
"Some other thoughts: I think laziness is a good thing because you trade
performance for simplicity and expressiveness."
Lazy evaluation allows a more declarative way of programming.