comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: smart pointer dangerous (no -> operator)
Date: Fri, 16 Jan 2009 13:21:37 -0800 (PST)
Date: 2009-01-16T13:21:37-08:00	[thread overview]
Message-ID: <c18df438-7a69-4c63-9015-d961a55c9144@v39g2000pro.googlegroups.com> (raw)
In-Reply-To: 49707299$0$32667$9b4e6d93@newsspool2.arcor-online.net

On 16 Sty, 12:42, Georg Bauhaus <rm.dash-bauh...@futureapps.de> wrote:

> Frequently overlooked, I think, Ada has nested scopes, useful
> in many ways here.
[...]

The problem is that in the majority of cases the whole point of
creating something dynamically (rather than on the stack) is to use it
in some other scope - outside of where it was created.

In your example the only motivation for allocating the object
dynamically would be to trade off stack space for heap space. Are
there any others?

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com

Database Access Library for Ada: www.inspirel.com/soci-ada




  parent reply	other threads:[~2009-01-16 21:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-16 10:04 smart pointer dangerous (no -> operator) Oliver Kowalke
2009-01-16 11:09 ` Dmitry A. Kazakov
2009-01-16 11:42   ` Georg Bauhaus
2009-01-16 12:43     ` Dmitry A. Kazakov
2009-01-16 21:21     ` Maciej Sobczak [this message]
2009-01-17 19:07       ` Georg Bauhaus
2009-01-16 11:46   ` Oliver Kowalke
2009-01-16 12:45     ` Dmitry A. Kazakov
2009-01-17  0:43   ` Brian Drummond
2009-01-17  9:28     ` Dmitry A. Kazakov
2009-01-16 20:08 ` Tero Koskinen
2009-01-16 21:16   ` Maciej Sobczak
2009-01-18 12:21 ` Samuel Tardieu
replies disabled

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