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,81bb2ce65a3240c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.230.98 with SMTP id sx2mr6055958pbc.1.1335567810160; Fri, 27 Apr 2012 16:03:30 -0700 (PDT) MIME-Version: 1.0 Path: r9ni106025pbh.0!nntp.google.com!news2.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.musoftware.de!wum.musoftware.de!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: What would you like in Ada202X? Date: Fri, 27 Apr 2012 18:03:23 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <3637793.35.1335340026327.JavaMail.geo-discussion-forums@ynfi5> <13849842.838.1335485882969.JavaMail.geo-discussion-forums@vbai3> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1335567808 14531 69.95.181.76 (27 Apr 2012 23:03:28 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 27 Apr 2012 23:03:28 +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 Date: 2012-04-27T18:03:23-05:00 List-Id: wrote in message news:13849842.838.1335485882969.JavaMail.geo-discussion-forums@vbai3... ... >And despite being a minor issue, I really wish they would create a generic >formal type for pool-specific access types >only (type T_Ptr is not access >all T?). It offends my delicate sensitivities that you can instantiate > >Unchecked_Deallocation for a general access type, because that's a compile >time error. I presume you also would want to ban the allocation of object for such an access type, since it should never be the case that you can allocate objects but not be able to deallocate them. (That's a certain storage leak.) And in that case, Ada 2012 has what you want (sort of): if you set the Storage_Size of an general access type to zero, it's illegal to allocate or call an instance of Unchecked_Deallocation on the type. See 13.11.2(3.1/3) and 4.8(5.4/3). (Why is the instance legal in this case? So that an instantiation of a generic that exports such an instantiation as a service to clients is still legal; otherwise you would need a separate generic for such access types, which is junk.) Randy.