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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: article on acces types and dynamic serialization in Ada (2003) Date: Thu, 22 Feb 2018 10:16:22 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <503e3322-ee8e-4d6f-9aa5-e7b98f87e8f8@googlegroups.com> NNTP-Posting-Host: MyFhHs417jM9AgzRpXn7yg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 X-Notice: Filtered by postfilter v. 0.8.3 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:50543 Date: 2018-02-22T10:16:22+01:00 List-Id: On 22/02/2018 00:57, Mehdi Saada wrote: > I already mailed you Simon Wright about it, but I've more info and questions, so it put it here. First the context: > I played with streams yesterday to learn more, and stumbled on something not really intuitive, at least. what means exactly Some_access_type'Write(Stream1, Some_Pointer) ? Bug, unless 1. 'Write is overridden, e.g. to flatten the pointer; 2. Stream is used for communication inside the same program, e.g. the pointer is simply marshaled. Linked data serialization requires more work and is usually far less straightforward than mere writing pointers. There are many approaches to that, e.g. external reference counted objects etc. All this is not really related to streams. P.S. You should simply follow the rule: never ever use predefined 'Read/'Write/'Input/'Output, except for the case #2, which is probably well under 1%. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de