From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,104df2b9b7a2f689 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!LF.net!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Interfaces Date: Tue, 17 May 2005 23:53:12 +0200 Message-ID: <87zmutsenr.fsf@deneb.enyo.de> References: <8764xj9wzf.fsf@deneb.enyo.de> <877jhz0y52.fsf@deneb.enyo.de> <87sm0mcjbx.fsf@deneb.enyo.de> <1rfnp5x3lxi3n$.mvahuo5ag68a$.dlg@40tude.net> <87u0l26rww.fsf@deneb.enyo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: albireo.enyo.de 1116366798 17609 212.9.189.177 (17 May 2005 21:53:18 GMT) X-Complaints-To: Cancel-Lock: sha1:DOpgRRovbPN5LlkQSZ9DoPGGs5w= Xref: g2news1.google.com comp.lang.ada:11073 Date: 2005-05-17T23:53:12+02:00 List-Id: * Robert A. Duff: >> >> Not in every context! In the context of a class-wide method of J1 it is >> unambiguous. Or else, consider T that implements J1 publicly and J2 >> privately. > > I believe that's illegal. You're not allowed to privately implement an > interface. I think so, and there's even an AARM note that seems to describe this particular case. > Anyway, I thought you were worried about the case where T implements J1 > and J2, both of which have type-conformant Foo's. And you override them > separately. Then it's clear which one you dispatch to from J1'Class > and J2'Class. But if you have an object X of type T, which overriding > does Foo(X) call? My knee-jerk reaction is: require a type conversion in all cases. Probably unacceptable if you want to compete with Java. 8->