[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Curl, multiple inheritance, and interfaces (was Re: cheerful static typing)



Christopher Barber wrote:
> Simply because we don't have time to design and implement everything that
> could be useful!

Sorry, I realize you don't have infinite development bandwidth.  The point I
was really making is that I think that saying MI implies "no need for
interfaces" is too strong, and I was curious if Curl had some other reason
to not require explicit interfaces.

> That may be true, but I rather doubt that they would have bothered to
> introduce the extra complexity of interfaces if they had retained full
> multiple inheritance.

If they hadn't, I'd be in there arguing for it!  ;)  Actually, it seems to
me that in the presence of MI and abstract classes, an explicit interface
feature doesn't add much extra complexity.  "Interface" can be a synonym for
abstract class, and Java-ish code like:

	class Child extends Daddy implements IDaddy {

could simply translate to MI:

	class Child extends Daddy, IDaddy {

The tradeoff in clarity of intent, and separation of concerns, seems worth
it to me.

Anton