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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,80435549e92d4e0c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Fri, 23 Sep 2005 19:06:42 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <87mzmssqbq.fsf@ludovic-brenta.org> <87psrmrdfz.fsf@ludovic-brenta.org> <1125991591.402272.176230@g47g2000cwa.googlegroups.com> Subject: Re: Charles container library usage examples Date: Fri, 23 Sep 2005 19:05:02 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4952.2800 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4952.2800 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-LtBeIIdQyy4E/8SPi7hsVBhzQy2T+jkbKtoy/dnbG75TG/jZfqv+Q+6KL6jw6tRpJhVkHdIC6lEhOTP!q2w2g7Sdnc1AcU/gYuotoRvlLSltbzKGwQv8ccRx5kHnVCaPiTnGxdxae94zvWCBp6kWOsk4V7aB X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:5081 Date: 2005-09-23T19:05:02-05:00 List-Id: "Ludovic Brenta" wrote in message news:1125991591.402272.176230@g47g2000cwa.googlegroups.com... >David Trudgett a �crit : >> >> 2. Did I need the separate file "corner_list.ads"? I tried to put it >> >> in "side_corners_map.ads", but the compiler didn't seem to like >> >> that idea. >> > >> > Yes, you need one because Side_Corner_Maps must be instantiated at >> > "library level". This prevents dangling references to nested types. >> >> OK ;-) I'll take your word for it... ;-) > >Somebody else might elaborate on how Ada 200y is making this rule more >subtle, so that library level instantiations are no longer necessary >in some cases; I'm actually curious to better understand this change. >Anyone? The quicky answer (now that I'm back from vacation and catching up here): Tucker Taft did an analysis and determined that the only cases where a (tagged) object could outlive its type were (1) objects that were returned; (2) objects that were allocated (for outer access types). Thus, it made sense to move the accessibility checks to those two locations, and allow the (nested) type extensions and objects of them (except in the previous two cases). This makes a ton of sense from a usability prespective (its too bad that it wasn't realized for Ada 95), but it does make type extensions significantly harder to implement. Randy. -- Ludovic Brenta.