comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org>
Subject: Re: Behavior of Stream Attributes On Access Types.
Date: Tue, 11 Jun 2002 10:27:22 -0400
Date: 2002-06-11T14:27:24+00:00	[thread overview]
Message-ID: <ae51cc$9ok$1@nh.pace.co.uk> (raw)
In-Reply-To: 4519e058.0206110547.526d2369@posting.google.com

"Ted Dennison" <dennison@telepath.com> wrote in message
news:4519e058.0206110547.526d2369@posting.google.com...
> "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org> wrote in
message news:<ae2v7f$r12$1@nh.pace.co.uk>...
> > My inclination is to think that the sensible thing would be to call the
> > 'Read or 'Write for the thing pointed to by the access type, but this
has
>
> You can pretty much count on it *not* doing that. For instance, what
> would happen in that case with a circularly-referenced structure like
> a doubly-linked list?
>
Giving it a few minutes of thought after I posted, this case occurred to me.
Initially, I was thinking about what would make sense and certainly storing
the access value is of minimal use the instant it goes out to a file or down
a wire. Hence, I thought, "Well maybe it should store the object pointed
to..." But clearly, as you point out, its an interesting opportunity to
create infinite recursion.


>
> > implications for dynamically allocated objects. Will it write/read a
> > (totally useless) access value?
>
> Pretty much. It isn't *totally* useless. It will work just fine within
> the same execution (assuming you don't deallocate the memory).
> However, it is next to useless.
>
Yeah, I just can't think of many cases where I want to write something into
a stream and not have it persist across executions or partitions or
whatever, wherein the address starts becoming a totally useless piece of
information. In the same execution? Why wouldn't I just keep referencing the
data structure I've already got? I suppose the language needs to do
*something* if it encounters an access type going into or out of a stream,
but its hard to imagine how one might make use of it.


> If you want better behavior, its up to you to override 'Write and
> 'Read for your pointer type. Then you can code it to handle things
> like circular references and deallocating the target's old value on a
> 'Read.
>
>
Basically, that's been the story. I was just wondering what the ARM had to
say about the default case & couldn't spot something explicit enough to
clear through the fog. Thanks for the help.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com





  reply	other threads:[~2002-06-11 14:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-10 19:38 Behavior of Stream Attributes On Access Types Marin David Condic
2002-06-11  5:33 ` R. Tim Coslet
2002-06-11 14:15   ` Marin David Condic
2002-06-11 13:47 ` Ted Dennison
2002-06-11 14:27   ` Marin David Condic [this message]
2002-06-11 14:37     ` Marin David Condic
2002-06-12 14:19       ` David C. Hoos
2002-06-12 15:18         ` Marin David Condic
2002-06-13  3:00           ` David C. Hoos, Sr.
2002-06-14 18:27           ` Simon Wright
2002-06-14 18:53             ` Marin David Condic
2002-06-15 14:56               ` Simon Wright
2002-06-16  2:27                 ` Randy Brukardt
2002-06-17 14:31                   ` Marin David Condic
2002-06-18 19:30                     ` Randy Brukardt
2002-06-12 19:39       ` Randy Brukardt
2002-06-12 13:31     ` Ted Dennison
2002-06-11 21:56   ` Randy Brukardt
2002-06-12  3:44 ` David C. Hoos, Sr.
replies disabled

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