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

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



At 03:08 PM 1/10/02, Anton van Straaten wrote:
>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:

I strongly agree with Anton.  After working on Dylan for a number of years,
I think that it was a mistake not to include a first-class notion of an 
interface.
The presence of MI doesn't make me miss interfaces any less.  In my own
code, I resorted to writing 'define interface' macros solely for the purpose of
documentation, since the macro does little except expand into a bunch of
'define generic' forms that I could have done by hand...

>         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