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,2d69f4a8070dd707 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-12 10:19:57 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail Message-ID: <3EE8B62E.6090605@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: AIs for Ada extensions References: <3EDC8FA6.2000308@noplace.com> <3EDFAC9F.5040802@cogeco.ca> <3EE5C45B.700@noplace.com> <3EE6CCA2.9010109@attbi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.62.164.137 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc52.ops.asp.att.net 1055438397 24.62.164.137 (Thu, 12 Jun 2003 17:19:57 GMT) NNTP-Posting-Date: Thu, 12 Jun 2003 17:19:57 GMT Organization: AT&T Broadband Date: Thu, 12 Jun 2003 17:19:57 GMT Xref: archiver1.google.com comp.lang.ada:39055 Date: 2003-06-12T17:19:57+00:00 List-Id: 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...