comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Object-Oriented style question
Date: Tue, 10 Jan 2012 13:27:38 +0100
Date: 2012-01-10T13:27:39+01:00	[thread overview]
Message-ID: <4f0c2ebb$0$7626$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <36ee3b54-496c-41d4-a8ba-3357741adada@p4g2000vbt.googlegroups.com>

On 10.01.12 09:47, Maciej Sobczak wrote:

>> The effect is that there still wouldn't be any parameters of an
>> anonymous access-to-object type at the level of T's definition.
> 
> Why this should be a goal?

For two reasons.

First, just restating that, as already agreed, the definition of
O-O types T should normally be concerned with operations defined
for the type T more than with operations defined on access T,
adopting Dmitry's parlance, if I may, for the sake of the argument.

Second, a pointer as a key can be seen as an implementation detail
used as an abstraction. More on this below.

> I prefer if the profile describes what is going on. If sh*t is going
> on, then it is better to show it in the profile than to hide it and
> surprise the user later.

Absolutely.

I wonder, though, whether the convention (using pointers to hint
at lifetime and identity) could be turned into a different setup.
The resulting types may entail more work, but perhaps also more
flexibility. Suppose objects' lifetimes can be interrupted.
For example, objects that can be "serialized" to external storage.
They then seize to exist. Later, the program may load the objects
from external storage, bringing them to life again. Perhaps on
a different machine/node/partition. This might effectively mean
that addresses of objects have changed.

A client program wishes access to an object that it "thinks" must exist,
because it has worked on this object before, knowing its identity
(via its access value). If every such object has a unique ID, and
this ID is used in place of its 'Access, then requesting access
to the object may trigger loading the object from external storage,
using said unique ID. Is this possible with pointers?




  parent reply	other threads:[~2012-01-10 12:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-08 12:45 Object-Oriented style question Georg Bauhaus
2012-01-08 12:52 ` Simon Wright
2012-01-08 13:25   ` Dmitry A. Kazakov
2012-01-08 14:18 ` Robert A Duff
2012-01-08 20:32   ` Martin Dowie
2012-01-08 20:52     ` Robert A Duff
2012-01-09 22:34   ` Adam Beneschan
2012-01-09 23:21     ` Robert A Duff
2012-01-10  8:34     ` Dmitry A. Kazakov
2012-01-09  8:55 ` Maciej Sobczak
2012-01-09 23:58   ` Georg Bauhaus
2012-01-10  8:47     ` Maciej Sobczak
2012-01-10 10:27       ` Dmitry A. Kazakov
2012-01-10 12:27       ` Georg Bauhaus [this message]
2012-01-11  8:54         ` Maciej Sobczak
2012-01-10 21:26       ` Randy Brukardt
2012-02-08 12:23 ` Yannick Duchêne (Hibou57)
2012-02-08 12:39 ` Yannick Duchêne (Hibou57)
replies disabled

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