From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6bf481efd29cf77b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-11 17:25:51 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!supernews.com!feed.textport.net!news.uni-stuttgart.de!news.belwue.de!news-stu1.dfn.de!news-mue1.dfn.de!newsfeed.vmunix.org!fr.clara.net!heighliner.fr.clara.net!newsgate.cistron.nl!psiuk-p2!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Behavior of Stream Attributes On Access Types. Date: Tue, 11 Jun 2002 10:27:22 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <4519e058.0206110547.526d2369@posting.google.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1023805644 10004 136.170.200.133 (11 Jun 2002 14:27:24 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 11 Jun 2002 14:27:24 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:25771 Date: 2002-06-11T14:27:24+00:00 List-Id: "Ted Dennison" wrote in message news:4519e058.0206110547.526d2369@posting.google.com... > "Marin David Condic" wrote in message news:... > > 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