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,d1ced5efd53fe6a1 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Can Ada95 interface with C++? Date: 1997/02/24 Message-ID: #1/1 X-Deja-AN: 221056628 References: <5csvbd$ia2@top.mitre.org> <32F60684.59E2@gslink.net> <32F94DD7.3F54BC7E@worldnet.att.net> <1997Feb6.150722.14570@ocsystems.com> <1997Feb6.130819.1@eisner> <1997Feb11.153355.1@eisner> <1997Feb12.004642.31821@ocsystems.com> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-02-24T00:00:00+00:00 List-Id: Joel says <> There is no problem in defining the equivalent of nonpolymorphic classes. To define "methods" in Ada 95 that are not virtual (using the C++ terminology), just don't make them primitive. Then they can be applied to any member of the class (the formal type is x'class in this case). It *is* the declaration of the operation in Ada 95 that determines whether the call dispatches. A class wide operation never dispatches. So the first concern here just seems plain wrong. I do not see why initialization/finalization is a big problem either. The GNAT interface design provides a clean way of interfacing to constructors and destructors (though this is not fuly implemented yet). Finally, the GNAT design handles multiply inherited classes without a problem. You cannot *define* such a class within Ada, but you can certainly *import* such a class.