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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dd7bced714e1250a X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Java interfaces -> ADA Date: 1999/04/19 Message-ID: #1/1 X-Deja-AN: 468341354 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <371B270E.19DC@lifl.fr> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1999-04-19T00:00:00+00:00 List-Id: Emmanuel.Leguy (leguy@lifl.fr) wrote: : > I guess since an interface says simply that a class that implements it : > needs to supply those methods, then in Ada, you would have a number : > of abstract methods for the tag record, and then any one who : > extends this record, will need to implement those methods since they : > are abstract. : > : But a java class can inherit more than one interface... The multiple : inheritance is not permit in ADA. Ada 95 supports multiple inheritance through a number of building block mechanisms, including generic "mix-ins" and through the use of access discriminants. You are correct that there is no specific syntax for multiple inheritance, but there are a number of flexible mechanisms that allow type multi-hierarchies to be supported. In our mapping of Ada to/from Java, we use components to implement Java interfaces. See http://www.averstar.com/~stt/adajava_paper/ In this case, the compiler helps out by providing a Convention "Java_Interface." However, much the same thing can be accomplished using components each with an access discriminant default initialized to refer to the enclosing object. A paper I wrote discussing this approach to multiple inheritance is on http://www.adahome.com, I believe. : -- : Laboratoire d'Informatique Fondamentale de Lille (LIFL) : Universite des Sciences et Technologies de Lille : Batiment M3 Cite Scientifique : 59655 Villeneuve d'Ascq Cedex : FRANCE : tel: 03 20 33 63 38 : fax: 03 20 43 65 66 : mailto:Emmanuel.Leguy@lifl.fr : http://www.lifl.fr -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA