comp.lang.ada
 help / color / mirror / Atom feed
* JGNAT and ObjectAda and ...
@ 2000-12-18 22:07 Thierry&Annick
  2000-12-19 12:39 ` Colin Paul Gloster
  2000-12-19 15:28 ` Robert Dewar
  0 siblings, 2 replies; 17+ messages in thread
From: Thierry&Annick @ 2000-12-18 22:07 UTC (permalink / raw)


Does anybody knows about a project for an official (ISO ...) JVM
targetted Ada95 to Java librairies ?
It seems to me that the way GNAT and ObjectAda are handling Java
libraries accesses  differs : GNAT uses a language extension "with type
... is access", and OA does not.

JVM target could be a new field of development for Ada, in CS education.



Thierry Bernier





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: JGNAT and ObjectAda and ...
  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
  1 sibling, 0 replies; 17+ messages in thread
From: Colin Paul Gloster @ 2000-12-19 12:39 UTC (permalink / raw)


In article <3A3E8A9E.D12673A7@libertysurf.fr>, Thierry&Annick wrote:
	"Does anybody knows about a project for an official (ISO ...) JVM
	[..]"

How could there be such a thing when Sun has twice pulled out of
standardisation efforts?



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: JGNAT and ObjectAda and ...
  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
  1 sibling, 1 reply; 17+ messages in thread
From: Robert Dewar @ 2000-12-19 15:28 UTC (permalink / raw)


In article <3A3E8A9E.D12673A7@libertysurf.fr>,
  Thierry&Annick <tajz@libertysurf.fr> wrote:
> Does anybody knows about a project for an official (ISO ...)
JVM
> targetted Ada95 to Java librairies ?
> It seems to me that the way GNAT and ObjectAda are handling
Java
> libraries accesses  differs : GNAT uses a language extension
"with type
> ... is access", and OA does not.


The "with type" extension is an ARG approved extension, so
eventually all compilers should support this.


Sent via Deja.com
http://www.deja.com/



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: JGNAT and ObjectAda and ...
  2000-12-19 15:28 ` Robert Dewar
@ 2000-12-19 16:01   ` Tucker Taft
  2000-12-20 16:14     ` Brian Rogoff
  0 siblings, 1 reply; 17+ messages in thread
From: Tucker Taft @ 2000-12-19 16:01 UTC (permalink / raw)


Robert Dewar wrote:
> 
> In article <3A3E8A9E.D12673A7@libertysurf.fr>,
>   Thierry&Annick <tajz@libertysurf.fr> wrote:
> > Does anybody knows about a project for an official (ISO ...)
> JVM
> > targetted Ada95 to Java librairies ?
> > It seems to me that the way GNAT and ObjectAda are handling
> Java
> > libraries accesses  differs : GNAT uses a language extension
> "with type
> > ... is access", and OA does not.
> 
> The "with type" extension is an ARG approved extension, so
> eventually all compilers should support this.

Though the "with type ... is access" part is not included
in the current ARG proposal (and it is still a "work item"
rather than in the "approved" state).

The current ARG proposal has "with type P.T;" and "with type P.T is tagged;"
as two possible "with type" clauses.  An anonymous access type
has also been proposed of the form "P.T'Class_Access".  Together
these two proposals approximate the "with type ... is access" feature.

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Commercial Division, AverStar (formerly Intermetrics)
(http://www.averstar.com/services/IT_consulting.html)  Burlington, MA  USA



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: JGNAT and ObjectAda and ...
  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 20:34       ` JGNAT and ObjectAda and Robert Dewar
  0 siblings, 2 replies; 17+ messages in thread
From: Brian Rogoff @ 2000-12-20 16:14 UTC (permalink / raw)


On Tue, 19 Dec 2000, Tucker Taft wrote:
> Robert Dewar wrote:
> > The "with type" extension is an ARG approved extension, so
> > eventually all compilers should support this.
> 
> Though the "with type ... is access" part is not included
> in the current ARG proposal (and it is still a "work item"
> rather than in the "approved" state).
> 
> The current ARG proposal has "with type P.T;" and "with type P.T is tagged;"
> as two possible "with type" clauses.  An anonymous access type
> has also been proposed of the form "P.T'Class_Access".  Together
> these two proposals approximate the "with type ... is access" feature.

Well, congratulations anyways! This topic was so heavily discussed a few
years ago (where is John Volan now?) that it seems a bit odd that when 
the "withing problem" is finally vanquished (OK, almost vanquished :) that
there is so little fanfare. 

So, are there any ARG proposals for more direct support for Java-style
interfaces? I seem to remember some discussion of this, and as long as
we're letting Java drive Ada development ;-)

-- Brian





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Multiple Interface Inheritance (was Re: JGNAT and ObjectAda and ...)
  2000-12-20 16:14     ` Brian Rogoff
@ 2000-12-20 19:55       ` Tucker Taft
  2000-12-20 21:35         ` Brian Rogoff
  2000-12-20 20:34       ` JGNAT and ObjectAda and Robert Dewar
  1 sibling, 1 reply; 17+ messages in thread
From: Tucker Taft @ 2000-12-20 19:55 UTC (permalink / raw)


Brian Rogoff wrote:
> ...
> So, are there any ARG proposals for more direct support for Java-style
> interfaces? I seem to remember some discussion of this, and as long as
> we're letting Java drive Ada development ;-)

Yes.  

I think of it more as recognizing that full multiple inheritance
never achieved "traction" in the programming language marketplace,
but that multiple inheritance of interfaces has shown itself to
have a good cost/benefit ratio.

In any case, if you want to see the proposal, go to:

  http://www.ada-auth.org/~acats/ais.html

and poke around for a recent AI on multiple inheritance
of "abstract interface" types.  Unfortunately, I don't
know the number at the moment.  The AI-SUMMARY.DOC file 
can be used to find out.  (It is really a text file, despite
the ".DOC" extension.)

> 
> -- Brian

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Commercial Division, AverStar (formerly Intermetrics)
(http://www.averstar.com/services/IT_consulting.html)  Burlington, MA  USA



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: JGNAT and ObjectAda and ...
  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 20:34       ` Robert Dewar
  2000-12-20 21:24         ` Brian Rogoff
  1 sibling, 1 reply; 17+ messages in thread
From: Robert Dewar @ 2000-12-20 20:34 UTC (permalink / raw)


In article
<Pine.BSF.4.21.0012200806260.20240-100000@shell5.ba.best.com>,
  Brian Rogoff <bpr@shell5.ba.best.com> wrote:
> Well, congratulations anyways! This topic was so heavily
discussed a few
> years ago (where is John Volan now?) that it seems a bit odd
that when
> the "withing problem" is finally vanquished (OK, almost
vanquished :) that
> there is so little fanfare.


Note that a form of "WITH TYPE" has been implemented in GNAT
for a long time now (it was in version 3.13)


> So, are there any ARG proposals for more direct support for
Java-style
> interfaces? I seem to remember some discussion of this, and
as long as
> we're letting Java drive Ada development ;-)

Not that I am aware of!

By the way, WITH TYPE is equally useful for the C++ case.


Sent via Deja.com
http://www.deja.com/



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: JGNAT and ObjectAda and ...
  2000-12-20 20:34       ` JGNAT and ObjectAda and Robert Dewar
@ 2000-12-20 21:24         ` Brian Rogoff
  0 siblings, 0 replies; 17+ messages in thread
From: Brian Rogoff @ 2000-12-20 21:24 UTC (permalink / raw)


On Wed, 20 Dec 2000, Robert Dewar wrote:
> In article
> <Pine.BSF.4.21.0012200806260.20240-100000@shell5.ba.best.com>,
>   Brian Rogoff <bpr@shell5.ba.best.com> wrote:
> > Well, congratulations anyways! This topic was so heavily
> discussed a few
> > years ago (where is John Volan now?) that it seems a bit odd
> that when
> > the "withing problem" is finally vanquished (OK, almost
> vanquished :) that
> > there is so little fanfare.
> 
> 
> Note that a form of "WITH TYPE" has been implemented in GNAT
> for a long time now (it was in version 3.13)

Of course. GNAT leads the way as usual. I'm just glad that soon this
capability will be standard Ada.

> > So, are there any ARG proposals for more direct support for
> Java-style
> > interfaces? I seem to remember some discussion of this, and
> as long as
> > we're letting Java drive Ada development ;-)
> 
> Not that I am aware of!

Too bad. My memory (correct me if I'm wrong) is that some of the players
in the Ada 9X process have said that they don't anticipate an Ada 0X and 
that language improvements would come about through the ARG and "de-facto" 
standardization. While I'm not an OO fanatic it seems to me that one area 
where Ada OOP capabilities could be enhanced would be in the addition of 
something like interfaces, or (OBE :) GNU C++ signatures. 

> By the way, WITH TYPE is equally useful for the C++ case.

Even more important to me, it is also useful for the "pure Ada" case. 
Anyways, great news, its good that Ada isn't standing still, and this 
removes one of my big annoyances with standard Ada. I was never happy
about the "with type" syntax (I hate "use type" as well) but now that the 
decision is made it is time to put aside our differences and rally around 
Ada. Oops, sorry about that... :-P

-- Brian





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Multiple Interface Inheritance (was Re: JGNAT and ObjectAda and ...)
  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
  0 siblings, 1 reply; 17+ messages in thread
From: Brian Rogoff @ 2000-12-20 21:35 UTC (permalink / raw)


On Wed, 20 Dec 2000, Tucker Taft wrote:
> Brian Rogoff wrote:
> > ...
> > So, are there any ARG proposals for more direct support for Java-style
> > interfaces? I seem to remember some discussion of this, and as long as
> > we're letting Java drive Ada development ;-)
> 
> Yes.  

Great!

> I think of it more as recognizing that full multiple inheritance
> never achieved "traction" in the programming language marketplace,

Well, that's debatable, but I think the rationale for leaving direct 
support for MI of implementation in Ada 95 is still valid, and in a 
language like Ada which has other means of abstraction I don't miss 
it much.

> but that multiple inheritance of interfaces has shown itself to
> have a good cost/benefit ratio.

Yes, the idea has been proven in the field. 

> In any case, if you want to see the proposal, go to:
> 
>   http://www.ada-auth.org/~acats/ais.html

Hmmm, I'm having trouble getting to this web site. Seems like something on
my end, but neither home nor work allow me to connect. If the site is
actually up, then I'll have to figure out where the problem is.

> and poke around for a recent AI on multiple inheritance
> of "abstract interface" types.  Unfortunately, I don't
> know the number at the moment.  The AI-SUMMARY.DOC file 
> can be used to find out.  (It is really a text file, despite
> the ".DOC" extension.)

Thanks!

-- Brian





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Multiple Interface Inheritance (was Re: JGNAT and ObjectAda and...)
  2000-12-20 21:35         ` Brian Rogoff
@ 2000-12-20 23:24           ` Tucker Taft
  2000-12-21  5:34             ` Brian Rogoff
  2000-12-24 20:48             ` Brian Rogoff
  0 siblings, 2 replies; 17+ messages in thread
From: Tucker Taft @ 2000-12-20 23:24 UTC (permalink / raw)


Brian Rogoff wrote:
> ...
> > In any case, if you want to see the proposal, go to:
> >
> >   http://www.ada-auth.org/~acats/ais.html
> 
> Hmmm, I'm having trouble getting to this web site. 

It was not responding for a while, but it seems better now.
I was able to find out that it is AI 251 (it badly needs an
example, but otherwise is pretty complete).

Here is a direct link to the most recent version of this AI:
   
    http://www.ada-auth.org/cgi-bin-acats/cvsweb.cgi/AIs/AI-00251.DOC?rev=1.3

> ...
> -- Brian

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Commercial Division, AverStar (formerly Intermetrics)
(http://www.averstar.com/services/IT_consulting.html)  Burlington, MA  USA



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Multiple Interface Inheritance (was Re: JGNAT and ObjectAda and...)
  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
  1 sibling, 0 replies; 17+ messages in thread
From: Brian Rogoff @ 2000-12-21  5:34 UTC (permalink / raw)


On Wed, 20 Dec 2000, Tucker Taft wrote:
> Brian Rogoff wrote:
> > ...
> > > In any case, if you want to see the proposal, go to:
> > >
> > >   http://www.ada-auth.org/~acats/ais.html
> > 
> > Hmmm, I'm having trouble getting to this web site. 
> 
> It was not responding for a while, but it seems better now.
> I was able to find out that it is AI 251 (it badly needs an
> example, but otherwise is pretty complete).

It is working for me now, thanks. 

Well, too bad about that AOCS design loss to C++. I'd certainly like MI of 
interface but it seems they went a bit far. 

OK, now its time for the ACT guys to implement this in the next version of 
GNAT, and hopefully you'll have your favorite front end modified soon too.

-- Brian





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Multiple Interface Inheritance (was Re: JGNAT and ObjectAda and...)
  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
  1 sibling, 1 reply; 17+ messages in thread
From: Brian Rogoff @ 2000-12-24 20:48 UTC (permalink / raw)


On Wed, 20 Dec 2000, Tucker Taft wrote:
> It was not responding for a while, but it seems better now.
> I was able to find out that it is AI 251 (it badly needs an
> example, but otherwise is pretty complete).
> 
> Here is a direct link to the most recent version of this AI:
>    
>     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. 

This is just a half-baked thought and I certainly would rather see the
Java capabilities sooner rather than more complete functionality much
later. OTOH, if it is possible to go further than Java without delaying 
much the opportunity should be taken now. Perhaps Baumgartner & Russo (the 
designers of the signature extension) would be interested in doing an Ada
version?

You're right that this proposal should have a higher profile than it does 
now, no smiley needed. The design loss at ESA is terrible!

-- Brian





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Multiple Interface Inheritance (was Re: JGNAT and ObjectAdaand...)
  2000-12-24 20:48             ` Brian Rogoff
@ 2000-12-25  8:06               ` Ehud Lamm
  2000-12-25 18:54                 ` Brian Rogoff
  0 siblings, 1 reply; 17+ messages in thread
From: Ehud Lamm @ 2000-12-25  8:06 UTC (permalink / raw)



Brian Rogoff <bpr@shell5.ba.best.com> wrote in message
news:Pine.BSF.4.21.0012241221330.24815-100000@shell5.ba.best.com...
> On Wed, 20 Dec 2000, Tucker Taft wrote:
> > It was not responding for a while, but it seems better now.
> > I was able to find out that it is AI 251 (it badly needs an
> > example, but otherwise is pretty complete).
> >
> > Here is a direct link to the most recent version of this AI:
> >
> >
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).
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. These ideas are best left for a new language to implement.
Notice that Ada is not orthogonal when it comes to interfaces: there are
many kinds of Ada abstractions, each with its own kind of interface. (I seem
to remember an MRT document listing some 7 methods of building Ada ADTs).
From where I am standing, the importance of interface/implemention
seperation and the importance of SPECIFYING good interface is so high, that
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)

It is quite problematic for a multi-paradigm language like Ada to handle
such issues consistently. For example, just consider all the work about
protected types and inheritance. Both supply interfaces - it is just that
the interaction of these causes so much trouble... (and remember: we still
want to be able to reason about interfaces, with out relying on impl.
details).

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...


--
Ehud Lamm   mslamm@mscc.huji.ac.il
http://lambda.weblogs.com  <== The Programming Languages Weblog







^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Multiple Interface Inheritance (was Re: JGNAT and ObjectAdaand...)
  2000-12-25  8:06               ` Multiple Interface Inheritance (was Re: JGNAT and ObjectAdaand...) Ehud Lamm
@ 2000-12-25 18:54                 ` Brian Rogoff
  2000-12-26  7:18                   ` Ehud Lamm
  2001-01-02 21:27                   ` Tucker Taft
  0 siblings, 2 replies; 17+ messages in thread
From: Brian Rogoff @ 2000-12-25 18:54 UTC (permalink / raw)


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





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Multiple Interface Inheritance (was Re: JGNAT and ObjectAdaand...)
  2000-12-25 18:54                 ` Brian Rogoff
@ 2000-12-26  7:18                   ` Ehud Lamm
  2001-01-02 21:27                   ` Tucker Taft
  1 sibling, 0 replies; 17+ messages in thread
From: Ehud Lamm @ 2000-12-26  7:18 UTC (permalink / raw)



Brian Rogoff <bpr@shell5.ba.best.com> wrote in message
news:Pine.BSF.4.21.0012251022110.1095-100000@shell5.ba.best.com...
> On Mon, 25 Dec 2000, Ehud Lamm wrote:
> > Brian Rogoff <bpr@shell5.ba.best.com> wrote in message
> > 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.

Quite so!

>
> > 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.

What made you think I think this is the final word? I was speaking about
designing/inventing a new approach, not about simply taking ideas from Java,
g++ or even Ocaml...

>
> > 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".

I agree 100%. That's why I wrote that what I am thinking about is "not in
the cards." I meant to say (and perhaps did'nt make myself clear) that it is
important to extend the language to allow things like ESA wants, and that
the AI  proposal seemed to be in the right direction.

>
> [...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.

As I said, I am thinking beyond what these offer.
(+ even if interfaces aren't first class, you should still decide what
operations are applicabe to the imagend 'Interface)

>
> > 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
>

And I wasn't suggesting/asking for anything, just giving another (perhaps
vague) perspective.


--
Ehud Lamm   mslamm@mscc.huji.ac.il








^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Multiple Interface Inheritance (was Re: JGNAT and ObjectAdaand...)
  2000-12-25 18:54                 ` Brian Rogoff
  2000-12-26  7:18                   ` Ehud Lamm
@ 2001-01-02 21:27                   ` Tucker Taft
  2001-01-03 19:15                     ` Brian Rogoff
  1 sibling, 1 reply; 17+ messages in thread
From: Tucker Taft @ 2001-01-02 21:27 UTC (permalink / raw)


Brian Rogoff wrote:
> ... 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.

There is interest in being able to "extract" or "construct" an
interface given an existing type.  One of the nice features of
Ada generics is that you can instantiate a generic with a type
and a set of operations that need not be primitives of the
type.  The operations can be created locally to match the needs
of the generic.  For example, you could define a "<" to be
used by a sorting generic which determined the kind of ordering
desired, but which had nothing to do with the "primitive" < of
the type.  In my view, the generics of Eiffel are  somewhat less powerful
because they don't really support this kind of "morphing" or
after-the-fact generalization.

The interesting question for Ada is whether given the addition
of an "abstract interface" capability, could one easily write
a generic that essentially added an interface after-the-fact,
and also did the "morphing."

For example, given the interface Ordered:

    type Ordered is abstract;
    function "<"(Left, Right : Ordered) return Boolean is abstract;

one could write a generic as follows:

    generic
        type T is tagged private;
        with function "<"(Left, Right : T) return Boolean is <>;
    package Ordered_Wrapper is
        type Ordered_T is new T and Ordered with null record;
        function "<"(Left, Right : Ordered_T) return Boolean;
    end Ordered_Wrapper;

    package body Ordered_Wrapper is
        function "<"(Left, Right : Ordered_T) return Boolean is
        begin
            return T(Left) < T(Right);
        end "<";
    end Ordered_Wrapper;

Does this solve at least part of the problem you were trying to solve?

In any case, feel free to propose something more specific.  Although
I failed to do this in AI 251, providing clear and convincing examples of use
is important to help understand the motivation behind the proposal.

> 
> -- Brian

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Commercial Division, AverStar (formerly Intermetrics)
(http://www.averstar.com/services/IT_consulting.html)  Burlington, MA  USA



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Multiple Interface Inheritance (was Re: JGNAT and ObjectAdaand...)
  2001-01-02 21:27                   ` Tucker Taft
@ 2001-01-03 19:15                     ` Brian Rogoff
  0 siblings, 0 replies; 17+ messages in thread
From: Brian Rogoff @ 2001-01-03 19:15 UTC (permalink / raw)


On Tue, 2 Jan 2001, Tucker Taft wrote:
> Brian Rogoff wrote:
> > ... 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.
> 
> There is interest in being able to "extract" or "construct" an
> interface given an existing type.  One of the nice features of
> Ada generics is that you can instantiate a generic with a type
> and a set of operations that need not be primitives of the
> type.  The operations can be created locally to match the needs
> of the generic.  For example, you could define a "<" to be
> used by a sorting generic which determined the kind of ordering
> desired, but which had nothing to do with the "primitive" < of
> the type.  In my view, the generics of Eiffel are  somewhat less powerful
> because they don't really support this kind of "morphing" or
> after-the-fact generalization.

Yes, well said. 

> The interesting question for Ada is whether given the addition
> of an "abstract interface" capability, could one easily write
> a generic that essentially added an interface after-the-fact,
> and also did the "morphing."
> 
> For example, given the interface Ordered:
> 
>     type Ordered is abstract;
>     function "<"(Left, Right : Ordered) return Boolean is abstract;
> 
> one could write a generic as follows:
> 
>     generic
>         type T is tagged private;
>         with function "<"(Left, Right : T) return Boolean is <>;
>     package Ordered_Wrapper is
>         type Ordered_T is new T and Ordered with null record;
>         function "<"(Left, Right : Ordered_T) return Boolean;
>     end Ordered_Wrapper;
> 
>     package body Ordered_Wrapper is
>         function "<"(Left, Right : Ordered_T) return Boolean is
>         begin
>             return T(Left) < T(Right);
>         end "<";
>     end Ordered_Wrapper;
> 
> Does this solve at least part of the problem you were trying to solve?

I was tempted to write "no" initially since I think of generics as being a 
"static" compile-time mechanism (yeah I know that's not *really* true) and 
tagged types/abstract interfaces as being a run-time mechanism. However, 
this example does solve my practical problems. Very nice! I guess you now
have one more example to add to the proposal. I'll try and think of some 
more places where an explicit interface_of kind of construct might be
useful but I suspect that at least for my needs we're at the point of 
diminishing returns. 

So, when can we expect implementations? :-)

> In any case, feel free to propose something more specific.  Although
> I failed to do this in AI 251, providing clear and convincing examples of use
> is important to help understand the motivation behind the proposal.

I think just rewriting Java and (old) GNU C++ examples into "Ada251" should
provide sufficient motivation. The old signature papers for C++ had lots
of practical examples of where the feature was useful. It is clear that
there is customer demand, too. 

-- Brian





^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2001-01-03 19:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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