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!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: How to get Ada to ?cross the chasm?? Date: Mon, 7 May 2018 15:40:04 -0500 Organization: JSA Research & Innovation Message-ID: References: <1c73f159-eae4-4ae7-a348-03964b007197@googlegroups.com><87k1su7nag.fsf@nightsong.com> <87po2la2qt.fsf@nightsong.com> <87in8buttb.fsf@jacob-sparre.dk><87wowqpowu.fsf@nightsong.com><16406268-83df-4564-8855-9bd0fe9caac0@googlegroups.com><87o9i2pkcr.fsf@nightsong.com> <87in88m43h.fsf@nightsong.com><87efiuope8.fsf@nightsong.com><322f9b26-01de-4753-bb50-6ef2f3d993d8@googlegroups.com><87a7th9pd1.fsf@nightsong.com><87h8no1nli.fsf@nightsong.com> <874ljo1hvy.fsf@nightsong.com> Injection-Date: Mon, 7 May 2018 20:40:06 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="17955"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:52072 Date: 2018-05-07T15:40:04-05:00 List-Id: "Simon Wright" wrote in message news:lyfu36zh6w.fsf@pushface.org... > "Randy Brukardt" writes: > >> Yes. There's an issue with vector cursors, they can become invalid >> because of "sliding" -- but vector cursors are rarely used (since the >> entire point of the container is to allow indexing, it's usually >> accessed that way). > > Thanks. > > I suppose one could include a 'generation' value in the vector, > incremented every time an element is removed or added, copied to a > cursor on creation of the cursor, and checked when the cursor is used. A > lot of work, for a slight amount of gain. Janus/Ada does (will do) something like that to detect almost all dangling/mispointed cursors, but it doesn't have to be quite that intensive. Randy.