comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: Multiple Interface Inheritance (was Re: JGNAT and ObjectAdaand...)
Date: Mon, 25 Dec 2000 18:54:39 GMT
Date: 2000-12-25T18:54:39+00:00	[thread overview]
Message-ID: <Pine.BSF.4.21.0012251022110.1095-100000@shell5.ba.best.com> (raw)
In-Reply-To: <926vah$iu4$1@news.huji.ac.il>

On Mon, 25 Dec 2000, Ehud Lamm wrote:
> Brian Rogoff <bpr@shell5.ba.best.com> 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





  reply	other threads:[~2000-12-25 18:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-18 22:07 JGNAT and ObjectAda and Thierry&Annick
2000-12-19 12:39 ` Colin Paul Gloster
2000-12-19 15:28 ` Robert Dewar
2000-12-19 16:01   ` Tucker Taft
2000-12-20 16:14     ` Brian Rogoff
2000-12-20 19:55       ` Multiple Interface Inheritance (was Re: JGNAT and ObjectAda and ...) Tucker Taft
2000-12-20 21:35         ` Brian Rogoff
2000-12-20 23:24           ` Multiple Interface Inheritance (was Re: JGNAT and ObjectAda and...) Tucker Taft
2000-12-21  5:34             ` Brian Rogoff
2000-12-24 20:48             ` Brian Rogoff
2000-12-25  8:06               ` Multiple Interface Inheritance (was Re: JGNAT and ObjectAdaand...) Ehud Lamm
2000-12-25 18:54                 ` Brian Rogoff [this message]
2000-12-26  7:18                   ` Ehud Lamm
2001-01-02 21:27                   ` Tucker Taft
2001-01-03 19:15                     ` Brian Rogoff
2000-12-20 20:34       ` JGNAT and ObjectAda and Robert Dewar
2000-12-20 21:24         ` Brian Rogoff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox