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,7f2ce8bda9cae4ab X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!newshub.sdsu.edu!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Thu, 13 May 2004 14:33:53 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <13392802.3gDeTK7ybb@linux1.krischik.com> <2780491.NPbR8AFya6@linux1.krischik.com> Subject: Re: "Must instantiate controlled types at library level." Why? Date: Thu, 13 May 2004 14:33:57 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-WeWTC+Hq7J/mDw61FwCpEjzDqxyadOqONELeQBw5+Vrd/f1LTeGl2ewZbd3rPcukskJkb0SFPQLGNi5!Bz2cTnQlEdcB7nd3C5En/g12LTFYRyr2lB2h0pkhqQ+95bsbW7c0IAay7ij1SYkkWXKPBjEviDU9 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.1 Xref: controlnews3.google.com comp.lang.ada:557 Date: 2004-05-13T14:33:57-05:00 List-Id: "Peter C. Chapin" wrote in message news:Xns94E8433AB7894pchapinsovernet@207.106.93.237... > Martin Krischik wrote in > news:2780491.NPbR8AFya6@linux1.krischik.com: > > > Well, here you have a good example of the difference of Ada and C++. Ada > > has a complete ban on the construct while C++ goes out and about to ban > > only the tricky part. > > It's interesting to reflect on these different approaches. C++ can get > away with imposing such restrictions on nested functions because nested > functions are rarely used in C++. In Ada similar restrictions on nested > procedures would be entirely unacceptable. Consequently Ada imposes > restrictions in a different place in order to avoid the same fundamental > problem. For what it's worth, the ARG is studying approaches to eliminate this restriction. It would be replaced by a number of smaller ones (checks on allocators, 'Access, return statements, and certain generic derivations). The main reason is the inability to instantiate the containers packages in nested scopes -- that seems like a nasty restriction. Randy.