
On 08-Feb-2001, Marcin 'Qrczak' Kowalczyk
I don't like the idea of treating the case "no explicit definitions were given because all have default definitions which are OK" differently than "some explicit definitions were given".
I don't really like it that much either, but...
When there is a superclass, it must have an instance defined, so if we permit such thing at all, I would let it implicitly define all superclass instances not defined explicitly, or something like that. At least when all methods have default definitions. Yes, I know that they can be mutually recursive and thus all will be bottoms...
... that is the problem I was trying to solve.
So maybe there should be a way to specify that default definitions are cyclic and some of them must be defined?
I agree 100%.
It is usually written in comments anyway, because it is not immediately visible in the definitions.
Yes. Much better to make it part of the language, so that the compiler can check it.
(now any method definition can be omitted even if it has no default!),
Yeah, that one really sucks.
--
Fergus Henderson