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,902bff0abea1083d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Why people wants to complicate code with Ada.Unchecked_Deallocation? References: <44c7c3d3$0$47958$4fafbaef@reader3.news.tin.it> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.176 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1154027511 12.201.97.176 (Thu, 27 Jul 2006 19:11:51 GMT) NNTP-Posting-Date: Thu, 27 Jul 2006 19:11:51 GMT Date: Thu, 27 Jul 2006 19:11:51 GMT Xref: g2news2.google.com comp.lang.ada:5970 Date: 2006-07-27T19:11:51+00:00 List-Id: adaworks@sbcglobal.net wrote: >> > I usually agree with you Jeff. In this case, we are in close agreement > except on one point. Ada includes a storage-pool capability that > allows for a wide range of storage management policies. I would > expect that to be a better option in situations where there is a concern > for dependable, predictbale storage management. That's another way to deallocate storage without all the opportunities for errors commonly found in languages like C. If your uses of access types and values are hidden, as is generally good practice, then so will be your storage pool. To the clients of the abstraction, it's invisible and probably makes no difference which you use. > That being said, I also find it uncommon for Ada designers to understand > the storage-pool feature well enough to take advantage of it. Perhaps > we need to put together a collection of storage pool management > examples demonstrating how this feature of the language can be > more effectively applied in a variety of circumstances. This could > reduce the amount of unchecked operations on storage management. In addition, in practice, it's usually more complex than controlled types doing unchecked deallocation on finalization. Such examples would be a good addition to the Ada pedagogical collection. -- Jeff Carter "Perfidious English mouse-dropping hoarders." Monty Python & the Holy Grail 10