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,adae40bcc4d01baf X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.71.11 Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!nntpfeed.proxad.net!news.netfinity.fr!news.albasani.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada 95 constructors on limited types Date: Mon, 7 Jan 2008 19:58:20 -0600 Organization: Jacob's private Usenet server Message-ID: References: <08dc2b30-6c8c-4cff-9f2e-c0d4c377972d@i3g2000hsf.googlegroups.com> <874pds36mu.fsf@ludovic-brenta.org> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1199757506 31582 69.95.181.76 (8 Jan 2008 01:58:26 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 8 Jan 2008 01:58:26 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1914 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 Xref: g2news1.google.com comp.lang.ada:19264 Date: 2008-01-07T19:58:20-06:00 List-Id: "Robert A Duff" wrote in message news:wccy7b4xqro.fsf@shell01.TheWorld.com... > But anyway, the purity issue applies to access types > whether they are public or not. I agree that it's > good to make things Pure when possible. > > Note that the rule was relaxed in Ada 2005 -- you can say: > > type T is access Blah; > for T'Storage_Size use 0; > > and still have pragma Pure. You can also have access-to-constant > and access-to-subprogram types. Ummm, that isn't very useful (that's a type for which there never can be an object!). I think you meant: type T is access all Blah; for T'Storage_Size use 0; ...which can be useful. But note that that the point of setting the storage size to 0 is to make allocators illegal - which greatly restricts what you can do. Better to avoid the access type altogether. Randy.