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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: class wide iterable (and indexable) Date: Sat, 5 Jan 2019 03:03:02 -0600 Organization: JSA Research & Innovation Message-ID: References: <2a6929c5-72fa-4d84-953a-44ea4597ab38@googlegroups.com> <95f6a9b0-adc6-4044-8ff8-f0820612aeea@googlegroups.com> Injection-Date: Sat, 5 Jan 2019 09:03:03 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="31319"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 X-RFC2646: Format=Flowed; Original Xref: reader01.eternal-september.org comp.lang.ada:55192 Date: 2019-01-05T03:03:02-06:00 List-Id: "Shark8" wrote in message news:95f6a9b0-adc6-4044-8ff8-f0820612aeea@googlegroups.com... > On Thursday, January 3, 2019 at 1:52:50 AM UTC-7, Simon Wright wrote: >> >> >> The Ada 95 Booch Components[4] follow this model. One reason they >> weren't taken as a model for Ada.Containers was that the model requires >> multiple levels of generic instantiation of child packages: for example, >> to make an unbounded map from Unbounded_String to Unbounded_String >> requires >> >> with Ada.Strings.Unbounded; >> with BC.Containers.Maps.Unbounded; >> with BC.Support.Standard_Storage; >> >> package Configuration_Demo_Support is >> >> package Abstract_String_Containers is new BC.Containers >> (Item => Ada.Strings.Unbounded.Unbounded_String, >> "=" => Ada.Strings.Unbounded."="); >> >> package Abstract_String_Maps >> is new Abstract_String_Containers.Maps >> (Key => Ada.Strings.Unbounded.Unbounded_String, >> "=" => Ada.Strings.Unbounded."="); > True; but the Automatic Instantiation AI would relieve a lot of the hassle > here -- > http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0268-1.txt?rev=1.2 The AI you refer to is only about formal packages, while the above doesn't have any formal packages so I fail to see how it would help. A more general automatic instantiation mechanism was also proposed in AI12-0215-1. But that one is a dead-body issue for me (at least as proposed). Ada gives specific places where every declaration occurs (statically) and is elaborated (dynamically). AI12-0215-1 throws that property completely away, harming analyzability, readability, and understandability -- it would be much like saying that there's no neeed to declare objects before using them because the compiler can figure out what was intended. Bah humbug. :-) Randy.