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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.52.171.231 with SMTP id ax7mr32316266vdc.9.1438036681221; Mon, 27 Jul 2015 15:38:01 -0700 (PDT) X-Received: by 10.140.36.170 with SMTP id p39mr504294qgp.28.1438036681162; Mon, 27 Jul 2015 15:38:01 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!z61no3686255qge.0!news-out.google.com!4ni82396qgh.1!nntp.google.com!z61no3686249qge.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 27 Jul 2015 15:38:00 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=108.44.154.41; posting-account=vk6_JwoAAABkMyHO1YfdP69Hm3CpbdGR NNTP-Posting-Host: 108.44.154.41 References: <5d6faxxdsssv.15g7kj5hv86mk$.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Why does `Unchecked_Deallocation` need the access type? From: Jeremiah Injection-Date: Mon, 27 Jul 2015 22:38:01 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:27056 Date: 2015-07-27T15:38:00-07:00 List-Id: On Sunday, July 26, 2015 at 7:16:51 AM UTC-4, Niklas Holsti wrote: > Ada could perhaps have allowed a formal_access_type_definition with an=20 > unnamed target type, perhaps of the form >=20 > type Name is access; -- Not Ada! >=20 > or >=20 > type Name is access <>; -- Not Ada! >=20 > and then the Object formal type could have been omitted from=20 > Unchecked_Deallocation. However, it seems to me that such formal access= =20 > types would not be very useful without the 'Target attribute that Dmitry= =20 > suggested. I think the only place where this has really bit me and I really felt I nee= ded it was when I was making a generic package for incomplete types and I w= anted to hide the deletion of access types from the client. But since they= were incomplete types, you could not use Unchecked_Deallocation within the= generic. It had to be created by the client (wrapped in another procedure= ) and passed in as a generic parameter, which felt like it defeated the pur= pose of me trying to hide those details. There might be other situations where it would be useful, but that is the o= ne I ran into.