comp.lang.ada
 help / color / mirror / Atom feed
From: jerry@jvdsys.stuyts.nl
Subject: Re: Dynamic Array Sizing
Date: 1999/06/21
Date: 1999-06-21T00:00:00+00:00	[thread overview]
Message-ID: <FDo6Ax.2J@stuyts.nl> (raw)
In-Reply-To: m3k8syd1lx.fsf@mheaney.ni.net

Matthew Heaney <matthew_heaney@acm.org> wrote:

:> : Why did you put the data on the heap?
:> 
:> Why not ?

: Because Ada has constructs specifically designed to obviate the need for
: heap.  
: When you have a choice between putting an object on the heap versus the
: stack, you should choose the stack.

Using the same logic I can claim that Ada has specific facilities for
managing heap based objects, so one should avoid putting data on the
stack :-) :-)

Reality is that either is possible, and that the choice made will depend
on the problem domain, requirements and local standards.

In this example I see no problem in using the heap. I you are really
affraid of undeallocated memory, make the type controlled and override
the Finalize procedure.

regards,
Jerry.

-- 
-- Jerry van Dijk | Leiden, Holland
-- Team Ada       | jdijk@acm.org
-- see http://stad.dsl.nl/~jvandyk




  reply	other threads:[~1999-06-21  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-19  0:00 Dynamic Array Sizing Nick Wilson
1999-06-19  0:00 ` jerry
1999-06-19  0:00   ` Matthew Heaney
1999-06-19  0:00     ` jerry
1999-06-20  0:00       ` Matthew Heaney
1999-06-21  0:00         ` jerry [this message]
1999-06-19  0:00   ` jerry
1999-06-19  0:00 ` Tom Moran
1999-06-19  0:00 ` Matthew Heaney
1999-06-20  0:00   ` Nick Wilson
1999-06-20  0:00     ` Matthew Heaney
replies disabled

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