comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Objects and the Stack?
Date: Mon, 20 Dec 2004 19:31:48 +0100
Date: 2004-12-20T19:31:48+01:00	[thread overview]
Message-ID: <1os47ftvazhq.1cc2aoj13qfb8.dlg@40tude.net> (raw)
In-Reply-To: mailman.204.1103559792.10401.comp.lang.ada@ada-france.org

On Mon, 20 Dec 2004 16:22:44 +0000, Marius Amado Alves wrote:

>> ... apparently my development activities must center on those few areas,
>> since I'm constantly using access types due to the unknowable-in-advance
>> quantities and structural relationships of the data that I'm dealing with.
> 
> You should attend a "No Pointers, Great Programs" tutorial :-)
> 
> The whole problem with pointers is that languages (incorrectly) mix 
> _allocation_ and _reference_ in them. Every complex design has 
> referential needs (names). A pointerless approach tries to insolate that 
> from the allocation troubles.

This is exactly the idea of pointer, I am afraid. You allocate object
somewhere and reference it elsewhere. Isolation here means that you can
copy that reference independently from the object with all consequences of
that.

In my view there is only one approach to the problem: static scopes. It is
objects allocated on the stack and also it is accessibility rules if the
former does not help. These both are directly supported in Ada. When that
does not help there are smart pointers. And it is again about static
scopes, though ones of pointers. The decision to destroy an object is made
when a the last pointer goes out of scope.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2004-12-20 18:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-16 22:27 Objects and the Stack? Freejack
2004-12-16 23:13 ` Nick Roberts
2004-12-20 14:50   ` Marc A. Criley
2004-12-20 16:22     ` Marius Amado Alves
2004-12-20 18:31       ` Dmitry A. Kazakov [this message]
2004-12-17  0:28 ` Jeffrey Carter
2004-12-17  8:45   ` Freejack
2004-12-17 11:11     ` Martin Dowie
2004-12-17 11:46     ` Nick Roberts
2004-12-17 19:52       ` Freejack
2004-12-18  4:02         ` Nick Roberts
2004-12-27  4:34         ` Dave Thompson
2004-12-18 19:41       ` Warren W. Gay VE3WWG
2004-12-18 20:50         ` Freejack
2004-12-18 21:15           ` Dmitry A. Kazakov
2004-12-27  4:34         ` Dave Thompson
2004-12-18  0:12     ` Jeffrey Carter
2004-12-18  0:43       ` Jeffrey Carter
replies disabled

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