instances and modules

Feuer feuer@his.com
Tue, 01 Jan 2002 13:08:58 -0800


> 2. A missing method definition is assumed to be bottom.
>    (I don't like this rule. Ghc with suitable options warns in such case.
>
This definitely sounds like a bad idea...  seems to violate intuition
about what an instance of a class is...  if you can't define a method of
the class, you probably don't belong in that class.

>The first point is important. It's possible that an overloaded function
>in the next version of a library is promoted to a method with a default
>definition, and then existing code using that class doesn't break.
Understood.  Not sure what I think of it.  Wouldn't it be better for the
new library to include a new class deriving from the old?  That would
more clearly indicate the relationship...  if the class itself changes,
the instances should change too.