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: border1.nntp.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!newsfeed.fsmpi.rwth-aachen.de!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Generics and Child Packages Date: Mon, 12 Aug 2013 15:27:34 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <79ec97f1-b5f8-4b12-b351-262fad685f50@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1376339258 21865 69.95.181.76 (12 Aug 2013 20:27:38 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 12 Aug 2013 20:27:38 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Original-Bytes: 2370 Xref: number.nntp.dca.giganews.com comp.lang.ada:182996 Date: 2013-08-12T15:27:34-05:00 List-Id: wrote in message news:79ec97f1-b5f8-4b12-b351-262fad685f50@googlegroups.com... ... >Though I still don't buy the "children of a generic are a generic" >explanation. The original rule was "generic units cannot have children". I still think that was the better rule. :-) Very late in the Ada 9x design process, child generics were added with the compromise that they would have to require explicit instantiations. Otherwise, we'd need to generate implicit instantiations somehow, and that would be a very new and complex concept in Ada. Unfortunately, there are a lot of problems with the current semantics as well (because withing a child of a generic causes an instance of a parent to "sprout" (in the terms of Steve Baird) a bunch of additional declarations, and that can cause all kinds of wacky conflicts). Those problems would have been multiplied by 10 if we had allowed implicit instantiations (because of the much larger number of implicit declarations). The whole idea of child units of generics is fatally flawed in my view. It just doesn't work semantically. Randy.