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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c5e219ab41be8c00 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-25 10:54:24 PST Path: supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!sjc-peer.news.verio.net!news.verio.net!sjc-read.news.verio.net.POSTED!not-for-mail Newsgroups: comp.lang.ada From: Brian Rogoff Subject: Re: Multiple Interface Inheritance (was Re: JGNAT and ObjectAdaand...) In-Reply-To: <926vah$iu4$1@news.huji.ac.il> Message-ID: References: <3A3E8A9E.D12673A7@libertysurf.fr> <91nur2$ulk$1@nnrp1.deja.com> <3A3F8651.7CDB13B6@averstar.com> <3A410EC1.106C74CC@averstar.com> <3A413FBB.3E852649@averstar.com> <926vah$iu4$1@news.huji.ac.il> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Mon, 25 Dec 2000 18:54:39 GMT NNTP-Posting-Host: 206.184.139.136 X-Complaints-To: abuse@verio.net X-Trace: sjc-read.news.verio.net 977770479 206.184.139.136 (Mon, 25 Dec 2000 18:54:39 GMT) NNTP-Posting-Date: Mon, 25 Dec 2000 18:54:39 GMT Organization: Verio Xref: supernews.google.com comp.lang.ada:3392 Date: 2000-12-25T18:54:39+00:00 List-Id: On Mon, 25 Dec 2000, Ehud Lamm wrote: > Brian Rogoff wrote in message > > > > http://www.ada-auth.org/cgi-bin-acats/cvsweb.cgi/AIs/AI-00251.DOC?rev=1.3 > > > > I've been pondering this a little and while it seems to capture the > desired > > Java functionality I wonder if it is possible to aim higher and get some > of > > the additional power of the old GNU C++ signature feature set, namely the > > ability to get the signature (abstract interface type in the AI > terminology) > > of an existing class (tagged type) and use this anonymous signature. Maybe > > a 'Interface attribute or somesuch corresponding to the sigof of GNU C++. > > As it never made it into a working GNU C++ that I used I can't say much > > about its use in practice but Sather had some similar capabilities. > > > > My feeling is that as a porposal for an extension to the existing language, > this seems quite nice (I didn't consider all the details yet, so I don't > want to say anything more definite/interesting). I'm still constructing little examples, by translating simple things from Java. I expect that Tucker and others are much better equipped than I to decide what may be feasible (or possible!) to implement in an Ada extension, however, as long as we're considering such a feature I think it would be reasonable to look beyond what Java has. > To really achive the state-of-the-art interface support, I think many many > features in the language should be redesigned, and I think doing this is > unreasonable. I agree completely, but the signature extension of C++ is by no means the final word on subtype polymorphism. Remember, it was a restricted extension to an existing language (C++) and it was limited compared to other languages at the time (Axioms' internal language, called A# I think) so it would hardly be "state-of-the-art". It may still not mesh well with Ada, and that is what I am curious about. > These ideas are best left for a new language to implement. If I'm really desparate for this capability I can use Ocaml ;-). But I think there are still good reasons for Ada, and I'm a bit peeved when I read that some European Space Agency projects switch to C++ because of Ada's (admittedly clunky) support for MI of interface. It will only get worse as Java gets more popular IMO, since interfaces really do show off the most important aspect of OO, namely (run time) polymorphism. So, while I agree that a new (Ada inspired) language might be a good thing I really think improving what we have now is more important. And this is an area where there is an undisputed "customer demand". [...snip...] > I'd prefer a lanuage more refined in its OVERALL apporahc to interfaces. > (e.g, supose we have 'Interface. What operations are allowed on this? Are > interface first class? I guess not) Not sure I follow you here. Interfaces aren't first class in Java, and packages aren't first class in Ada. > All these fascinating topics, IMO, but I think for Ada0X we must be modest. > Ada9X did a wonderful job incorporating inheritance into Ada, and I'd love > to see a solution of this quality to these issues. But even the best > solutions (and the AI does indeed look convincing) still seem to me to be > limited in scope. I am afraid I can't offer something better (or even > somethng that SEEMS better), without proposing a major change in the > language, and this is simply not in the cards... This all seems vague to me. "Something better/more powerful" may still be limited in scope. I still suggested an explict 'Interface or sigof rather than suggesting inference, which is more powerful yet. All I want to know is whether the ability to an extract an (anonymous?) interface from an existing tagged type might reasonably be added to the proposal. -- Brian