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: a07f3367d7,8e11100f675ea2df X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.109.162 with SMTP id ht2mr2802076wib.1.1357903150562; Fri, 11 Jan 2013 03:19:10 -0800 (PST) Path: o9ni6608wio.1!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!94.232.116.11.MISMATCH!feed.xsnews.nl!border-1.ams.xsnews.nl!newsfeed.x-privat.org!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: asynchronous task communication Date: Tue, 08 Jan 2013 21:14:31 +0000 Organization: A noiseless patient Spider Message-ID: References: <1c2dnd5E6PMDR33NnZ2dnUVZ_sednZ2d@earthlink.com> <7cudnYloBfQDw3_NnZ2dnUVZ_rKdnZ2d@earthlink.com> <6bqdndEYjoxeGHnNnZ2dnUVZ_sadnZ2d@earthlink.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="585248293da7adcafb924c79c19cf5ec"; logging-data="14199"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Rh2HbaQX+VBn4HTXmARz3+lWNVEeGJ4g=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (darwin) Cancel-Lock: sha1:pG7KudtCZsse7Jx6Sfegp0BXeh0= sha1:FTt0ZueOA/TwEd7ZUYiM8Vg7UJY= Content-Type: text/plain Date: 2013-01-08T21:14:31+00:00 List-Id: Jeffrey Carter writes: > On 01/08/2013 11:18 AM, Simon Wright wrote: >> Jeffrey Carter writes: >> >>> If you have an item in your (unbounded) array, indexed by Positive, at >>> index 3, it will still be at index 3 if you assign to components at >>> other indices, or extend the array by adding new components beyond the >>> current end of the array. However, if you insert a new component >>> before the existing item at index 3, then all the components after the >>> new component will shift up, and the existing item will then be at >>> index 4. >>> >>> One would think that a Cursor would behave similarly. >> >> Not so! The Cursor becomes ambiguous[1], and using it is a bounded >> error. GNAT GPL 2012 implements Cursor using an Index, & behaves the way >> you'd expect. > > To my mind, that is Cursor behaving similarly. Just as the index 3 is > no longer the index of the item in question, so the Cursor should not > be relied on. In AdaCore's implementation, yes. But another implementation might validly raise PE. To my mind, that'd be preferable.