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: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Rust's temporal safety for Ada/SPARK Date: Mon, 15 May 2017 18:23:07 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <1c0e2c7c-4fd6-43d1-9848-f03e1a72bcb3@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 15 May 2017 16:19:47 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="c7c052a4c88e1c3d69d26111316a50aa"; logging-data="27883"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ZgD6gTcJ+ERrKgRtZysOnXhL9zgGIihg=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Cancel-Lock: sha1:AVS7gsOpAuqgEt7sZUY6EyaKvjg= Xref: news.eternal-september.org comp.lang.ada:46786 Date: 2017-05-15T18:23:07+02:00 List-Id: On 05/14/2017 09:59 PM, Niklas Holsti wrote: > > "Well designed" is of course subjective. 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). I'm pretty sure the "tampering" restrictions in the containers have nothing to do with possible implementations (which need not even be in Ada), and everything to do with maintaining the integrity of the structures. They're intended to ensure that an ordered container doesn't have an element out of order, or a hashed container, one with a different hash than its bin. > I find it difficult to agree with that "overwhelming", at least if one includes > the access types used under the covers in the container library. There's nothing about using the containers that requires the user to write "access", so clearly they should not be included. One might want to use 'access to pass a subprogram as an anonymous access-to-subprogram parameter of a container operation, but since such things can't be assigned and can't be freed, they're not really access types, but rather a strange syntax for limited subprogram types. -- Jeff Carter "Strange women lying in ponds distributing swords is no basis for a system of government." Monty Python & the Holy Grail 66