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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,24d7acf9b853aac8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: S-expression I/O in Ada Date: Wed, 25 Aug 2010 23:38:54 +0100 Organization: A noiseless patient Spider Message-ID: References: <547afa6b-731e-475f-a7f2-eaefefb25861@k8g2000prh.googlegroups.com> <4c74cf12$0$6892$9b4e6d93@newsspool2.arcor-online.net> <4c756ccb$0$6771$9b4e6d93@newsspool3.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Wed, 25 Aug 2010 22:38:56 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="6124"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/siS0vhuwytgV5ShfDE3/b/1wkAD4MFJc=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:IcnG5D2JwmAS0nUXBoPcq0r+m8U= sha1:exHfHxgiXXuOGDClGnvCzmv8Ylg= Xref: g2news1.google.com comp.lang.ada:13745 Date: 2010-08-25T23:38:54+01:00 List-Id: Georg Bauhaus writes: > On 25.08.10 20:55, Simon Wright wrote: >> Georg Bauhaus writes: >> >>> To store data, keep the List type, but store objects inside a map. >> >> This would mean that the order in which data is accessed isn't the order >> in which it was received. > > Why not? If reading appends to a list stored at > the current key which lives on top of a stack? > > (A B (C D E) F) > > '(' ~> push key_1 -- First key will be returned > > key_1 : A B key_2 -- '(' ~> push key_2 > key_2 : C D E -- ')' ~> pop (key_1 on top) > | > v > key_1 : A B key_2 F -- ')' ~> pop (stack empty) > key_2 : C D E > > First_Key := key_1; > return; Oh. I had quite misunderstood your meaning. There are issues - like copying a sexp and then deleting or changing part of one of them, how to know when to delete or duplicate. Seems to me that the key is a disguised pointer to a shared structure?