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!news4.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!feed.news.tiscali.de!news.belwue.de!LF.net!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Interfaces Date: Mon, 16 May 2005 22:44:19 +0200 Message-ID: <878y2eyk7w.fsf@deneb.enyo.de> References: <8764xj9wzf.fsf@deneb.enyo.de> <877jhz0y52.fsf@deneb.enyo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: albireo.enyo.de 1116276263 26497 212.9.189.177 (16 May 2005 20:44:23 GMT) X-Complaints-To: Cancel-Lock: sha1:6VPC+u8eTWsVIyNUd8Xrpy47rV4= Xref: g2news1.google.com comp.lang.ada:11049 Date: 2005-05-16T22:44:19+02:00 List-Id: * Robert A. Duff: >> Maybe it wouldn't be too complicated to add a way to specify the >> interface which you are overriding? Something like "overriding J1 >> procedure Foo"? This would result in an error message if Foo also >> overrode a subprogram inherited from T or J2. > > Maybe. I'm not sure how this would work with multiple inheritance in > general. For example the diamond inheritance pattern. I'm not after such fancy things. Basically, I'd like to declare that there is no diamond, by explicitly labeling the interfaces I'm overriding. The compiler has to gather the information anyway, to built the dispatch tables. Implementation-wise, it shouldn't be very hard to check if the subprogram ends up in the specified tables only.