comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: Why people wants to complicate code with Ada.Unchecked_Deallocation?
Date: Thu, 27 Jul 2006 19:11:51 GMT
Date: 2006-07-27T19:11:51+00:00	[thread overview]
Message-ID: <Xd8yg.860067$084.31603@attbi_s22> (raw)
In-Reply-To: <Sf5yg.73359$fb2.41368@newssvr27.news.prodigy.net>

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



  reply	other threads:[~2006-07-27 19:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-26 19:34 Why people wants to complicate code with Ada.Unchecked_Deallocation? fabio de francesco
2006-07-26 19:51 ` Georg Bauhaus
2006-07-26 19:56 ` Simon Wright
2006-07-26 21:28 ` Jeffrey R. Carter
2006-07-27 15:49   ` adaworks
2006-07-27 19:11     ` Jeffrey R. Carter [this message]
2006-07-27 22:52     ` Simon Wright
2006-07-27 23:28       ` Robert A Duff
2006-07-27  0:07 ` Peter C. Chapin
2006-07-27 11:54 ` gautier_niouzes
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox