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!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Rust's temporal safety for Ada/SPARK Date: Sun, 14 May 2017 21:43:50 +0100 Organization: A noiseless patient Spider Message-ID: References: <1c0e2c7c-4fd6-43d1-9848-f03e1a72bcb3@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="4d5a0ba7df0eddd4382adc0ec0109cfd"; logging-data="15180"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189036+Pe2J0ky1qJSlLWXx5bf8REpq2OE=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) Cancel-Lock: sha1:kc/s2YucMFwFpo3XQeozjR5ab4k= sha1:BkoaO6acuZMcsczmFOJX0D6FL2o= Xref: news.eternal-september.org comp.lang.ada:46781 Date: 2017-05-14T21:43:50+01:00 List-Id: Niklas Holsti writes: > The container library has made it practical to avoid access types in > the application code, but then there are other potential run-time > problems, such as "tampering" with the containers, which require > run-time checks (and which are to some extent consequences of the use > of access types within the container library). The current (GCC 7) containers allow suppression of tampering checks, see [1], for performance reasons. I don't believe that the tampering checks are mainly, if at all, the consequnece of using access types. Suppose you are iterating over an ordered map and you change the current element so as to alter its sort key? Or, for that matter, any other element? Suppose you delete the element you are currently visiting? [1] http://www.adacore.com/developers/development-log/NF-74-O426-003-gnat/