comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@attbi.com>
Subject: Re: AIs for Ada extensions
Date: Thu, 12 Jun 2003 17:19:57 GMT
Date: 2003-06-12T17:19:57+00:00	[thread overview]
Message-ID: <3EE8B62E.6090605@attbi.com> (raw)
In-Reply-To: e2e5731a.0306111710.681ae736@posting.google.com

Alexander Kopilovitch wrote:

> It seems to be an unfortunate collision that multiple new packages should be
> proposed when Abstract Interfaces still aren't established firmly.
> It is highly likely that some packages (for example, Data structures
> components) may look significantly better if they can use Abstract Interfaces.
> But one can't expect "widely used" prototype interface-based packages for
> standartization until Abstract Interfaces went into practice in Ada.
> So, perhaps, standartization of packages that can significantly benefit
> from Abstract Interfaces should be delayed, and follow the Core standard
> after year or two.

I personally don't see any conflict.  The interface AI will allow easier 
bindings to C++ and Java.  But in Ada, mix-ins are a better abstraction 
IMHO for containers.  The advantage is that you can easily put objects 
in a container even if the original declarer of the type/class had no 
idea that they would be put in a container.  For example:

with Ada.Containers.AVL_Tree;
generic
   type Member is private;
   with function Index(E: Element) return String;
   Null_Entry: Member;
package Dictionaries is
   type Dictionary is limited private;
   function Lookup (Key: in String) return Member;
   function Add (M: in Member);
   ...
private
   type Dictionary is new Ada.Containers.AVL_Tree(Member,...);
   ...
end Dictionaries;

(No arguments about how to better do this, please.  This is just an 
expository example)

Notice that using mix-in containers, the type Member doesn't have to 
"know" that it could be added to a Dictionary.  The actual dictionary 
entry will in effect be a child of Member and AVL_Trees.Tree.  But 
Member doesn't even have to be a tagged type...






  reply	other threads:[~2003-06-12 17:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-31  5:01 Ada.Networks.Sockets hierarchy for standardization? Warren W. Gay VE3WWG
2003-05-31  6:33 ` Tarjei T. Jensen
2003-05-31 13:35   ` Simon Wright
2003-05-31 17:24 ` Michael Erdmann
2003-05-31  1:35   ` Ada.Networks.Sockets hierarchy for standardization? (sf: ada0y-net-std) Warren W. Gay VE3WWG
2003-06-01  4:02     ` Randy Brukardt
2003-06-02 16:56       ` Warren W. Gay VE3WWG
2003-06-03  0:39         ` Randy Brukardt
2003-06-03  3:47           ` Provisional Standards was RE: Ada.Networks.Sockets hierarchy for standardization? (sf:ada0y-net-std) Robert C. Leif
     [not found]             ` <3EDC8FA6.2000308@noplace.com>
2003-06-05 20:48               ` Provisional Standards was RE: Ada.Networks.Sockets hierarchy (Provisional Standard?) Warren W. Gay VE3WWG
2003-06-06 11:49                 ` Marin David Condic
2003-06-06 15:51                 ` Provisional Standards was RE: Ada.Networks.Sockets hierarchy(Provisional Standard?) Robert C. Leif
2003-06-07 11:39                 ` Provisional Standards was RE: Ada.Networks.Sockets hierarchy (Provisional Standard?) Marin David Condic
2003-06-10 11:43                 ` Marin David Condic
2003-06-10 17:17                   ` Warren W. Gay VE3WWG
2003-06-11 11:05                     ` Marin David Condic
2003-06-10 17:22                   ` Warren W. Gay VE3WWG
2003-06-11  6:31                   ` AIs for Ada extensions Robert I. Eachus
2003-06-11 11:08                     ` Marin David Condic
2003-06-12  1:10                     ` Alexander Kopilovitch
2003-06-12 17:19                       ` Robert I. Eachus [this message]
2003-06-13  1:02                         ` Alexander Kopilovitch
2003-06-13  7:21                           ` Robert I. Eachus
2003-06-13 21:53                             ` tmoran
2003-06-14 23:30                             ` Alexander Kopilovitch
2003-05-31 23:47   ` Ada.Networks.Sockets hierarchy for standardization? Warren W. Gay VE3WWG
2003-06-01  7:07     ` Michael Erdmann
replies disabled

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