comp.lang.ada
 help / color / mirror / Atom feed
From: Brian.Gaffney@myrealbox.com (Brian Gaffney)
Subject: Re: Suggestion for Ada 200x - Interface inheritance
Date: 29 May 2003 09:47:12 -0700
Date: 2003-05-29T16:47:13+00:00	[thread overview]
Message-ID: <5e9b8c34.0305290847.20ea2300@posting.google.com> (raw)
In-Reply-To: wcc3cj5i2cd.fsf@shell01.TheWorld.com

Robert A Duff <bobduff@shell01.TheWorld.com> wrote in message news:<wcc3cj5i2cd.fsf@shell01.TheWorld.com>...
> "Steve" <nospam_steved94@attbi.com> writes:
> 
> > Java and C# use the concept of interface inheritance.  What do you think of
> > adding this feature to Ada?
> 
> I think it's a good idea.  There is an AI on this, and I think the ARG
> is considering it one of the most urgent ones.  Look up the AI, and see
> what you think.
> 
> - Bob

(http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00251.TXT?rev=1.12)

I looked briefly at this AI (though I haven't read it in detail -- so
I might have missed something), and there's one thing about it that I
don't understand:  If Ada'0Y is to add the concept of Interfaces, why
would it be added as an Interface _type_?  I can understand Java and
C# using a Class-based approach, but since Ada splits up the concepts
of a 'Class' wouldn't it be more the Ada-Way to use a concept related
to packages?  For example an "abstract package" which must have a body
provided at the 'instantiation' site.

I don't think this example would work, but something like:

   generic
      type Data is private;
   abstract package This_Interface is ...
or
   abstract package This_Interface (type Data is private) is ...

along with

   ...
      type Mine is ...
      package My_Interface is new This_Interface(Mine);
      package body My_Interface is ...
   ...

I don't like this since My_Interface would be a different scope than
that containing Data, but perhaps a way could be devised to annotate
the type definition:

   type Mine is ... with This_Interface(Mine) ...
or 
   type Mine is ...
   for Data'interface use This_Interface(Mine), That_Interface(Mine),
...;"

The bodies for subroutines, etc. defined in the Interfaces would then
be required to follow (within the freezing rules?).

This would give the advantage of allowing it for all types, not just
tagged types.

                     --Brian



  reply	other threads:[~2003-05-29 16:47 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-23 23:05 Suggestion for Ada 200x - Interface inheritance Steve
2003-05-24  1:02 ` Robert A Duff
2003-05-29 16:47   ` Brian Gaffney [this message]
2003-06-01 10:29   ` Craig Carey
2003-05-24 12:35 ` Wojtek Narczynski
2003-05-24 17:53   ` Georg Bauhaus
2003-05-25 13:11     ` Wojtek Narczynski
2003-05-24 22:07   ` Robert A Duff
2003-05-25 14:12     ` Wojtek Narczynski
2003-05-25 17:53       ` Jeffrey Carter
2003-05-25 18:47         ` Wesley Groleau
2003-05-25 19:42           ` Hyman Rosen
2003-05-26  7:53             ` Wojtek Narczynski
2003-05-26 15:50               ` Hyman Rosen
2003-05-27 18:41                 ` Wojtek Narczynski
2003-05-27 18:55                   ` Wesley Groleau
2003-05-27 19:13                   ` Hyman Rosen
2003-05-28 13:07                     ` Wojtek Narczynski
2003-05-28 13:28                       ` Jean-Pierre Rosen
2003-05-29  0:58                       ` Hyman Rosen
2003-05-28 22:13             ` Robert A Duff
2003-05-28 23:50               ` Hyman Rosen
2003-05-29  9:17               ` Dmitry A. Kazakov
2003-05-29 13:31               ` Wojtek Narczynski
2003-05-26  7:51           ` Wojtek Narczynski
2003-05-25  1:33   ` Steve
2003-05-25 10:37     ` Simon Wright
2003-05-26  7:54     ` Jean-Pierre Rosen
2003-05-26 10:07       ` Preben Randhol
2003-05-26 16:32         ` Pascal Obry
2003-05-26 16:59           ` Preben Randhol
2003-06-01 10:53       ` Craig Carey
2003-06-01 12:17         ` Preben Randhol
2003-05-26  7:49   ` Jean-Pierre Rosen
2003-06-02  9:01     ` Wojtek Narczynski
2003-05-28 13:57 ` MI in Ada 200X (was: Suggestion for Ada 200x - Interface inheritance) Mário Amado Alves
2003-05-28 15:05   ` Preben Randhol
2003-05-29  0:54     ` MI in Ada 200X Hyman Rosen
2003-05-29 17:38       ` Stephen Leake
2003-05-30  7:20       ` Preben Randhol
2003-05-29  9:17     ` MI in Ada 200X (was: Suggestion for Ada 200x - Interface inheritance) Dmitry A. Kazakov
2003-05-29 22:56       ` MI in Ada 200X Hyman Rosen
2003-05-30  7:39         ` Dmitry A. Kazakov
2003-05-30 13:11           ` Hyman Rosen
2003-05-30 14:29             ` Robert A Duff
2003-05-30 14:51               ` Hyman Rosen
2003-05-30 15:11         ` Mark A. Biggar
2003-05-30 15:51           ` Hyman Rosen
2003-05-30 22:38           ` John Griffiths
2003-05-30  2:50       ` Wesley Groleau
2003-05-30  7:38         ` Dmitry A. Kazakov
2003-05-30 12:20           ` Karel Miklav
2003-05-30 12:59             ` Hyman Rosen
2003-05-30 14:02               ` Georg Bauhaus
2003-05-30 14:04                 ` Lutz Donnerhacke
2003-05-30 18:45                   ` Georg Bauhaus
2003-05-30 15:02                 ` Hyman Rosen
2003-05-30 19:14                   ` Georg Bauhaus
2003-05-30 19:40                     ` Hyman Rosen
2003-05-30 19:31               ` Wojtek Narczynski
2003-05-30 22:42             ` John Griffiths
2003-05-31  9:27             ` Dmitry A. Kazakov
2003-05-31 13:53               ` Martin Krischik
2003-06-01  9:18                 ` Dmitry A. Kazakov
2003-05-30  8:28         ` Mário Amado Alves
2003-05-30  8:46       ` MI in Ada 200X (was: Suggestion for Ada 200x - Interface inheritance) Preben Randhol
2003-05-31 10:17         ` Dmitry A. Kazakov
2003-05-31 13:48           ` Preben Randhol
2003-05-31 17:21             ` Dmitry A. Kazakov
2003-05-29  0:54   ` MI in Ada 200X Hyman Rosen
2003-05-29  2:13   ` MI in Ada 200X (was: Suggestion for Ada 200x - Interface inheritance) Robert I. Eachus
2003-05-29 12:06     ` Mário Amado Alves
2003-05-31 19:58       ` Chad R. Meiners
  -- strict thread matches above, loose matches on Subject: below --
2003-06-02 15:57 Suggestion for Ada 200x - Interface inheritance Lionel.DRAGHI
2003-06-02 18:58 ` Pascal Obry
2003-06-02 19:27 ` Bill Findlay
2003-06-03 17:33 Lionel.DRAGHI
2003-06-03 17:46 ` Vinzent Hoefler
2003-06-03 18:49   ` Bill Findlay
2003-06-03 19:02     ` Vinzent Hoefler
2003-06-03 19:13     ` Vinzent Hoefler
2003-06-03 17:38 Lionel.DRAGHI
2003-06-03 17:47 ` Preben Randhol
2003-06-03 17:48 ` Vinzent Hoefler
2003-06-04 16:22 Lionel.DRAGHI
replies disabled

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