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-Thread: 103376,591cbead201d7f34 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!eweka.nl!lightspeed.eweka.nl!195.114.231.69.MISMATCH!feeder.news-service.com!feeder.news-service.com!news.astraweb.com!border2.a.newsrouter.astraweb.com!xlned.com!feeder1.xlned.com!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 19 Mar 2008 12:31:23 +0100 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Prohibiting dynamic allocation for the given type References: <83335709-e099-416b-9967-5ab6aa0aea11@i12g2000prf.googlegroups.com> <89ac4348-4c21-478e-b491-97bfbebfdb86@p73g2000hsd.googlegroups.com> In-Reply-To: <89ac4348-4c21-478e-b491-97bfbebfdb86@p73g2000hsd.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <47e0f98c$0$4856$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 19 Mar 2008 12:31:24 CET NNTP-Posting-Host: 1b240210.newsspool4.arcor-online.net X-Trace: DXC=[H25n\6iNU685[]]\]T0814IUK2Uh70onCBMK3nc\616M64>:Lh>_cHTX3j=8f1l5g`E7S0 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:20480 Date: 2008-03-19T12:31:24+01:00 List-Id: Maciej Sobczak schrieb: > On 19 Mar, 04:06, gp...@axonx.com wrote: > >> Ada is high level language > > That does not matter. > Ada is a high level language, but still provides two ways to create an > object: > > X : Type; > Y : Type_Ptr := new Type; > > If these two methods are available, then apparently there is a > difference between them and this difference is not in *where* objects > are created, but *how long* they are allowed to live. > > The high-level part of Ada can hide the "where" part, but not "how > long". With Ada 2005, you can try types derived in nested scopes. No objects of a more deeply nested type can leave these scopes (pointers to parent'class cannot be used as an escape).