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!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Why are Ada compilers difficult to write ? Date: Thu, 28 Jun 2018 20:26:29 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <584564c2-9f64-4965-b045-535cdaf899c0@googlegroups.com> <2d617160-ac33-40e6-a06a-97cc0b53062d@googlegroups.com> <874lhsnvye.fsf@adaheads.home> <0a01e940-ec24-40b2-83f0-93157e379dc5@googlegroups.com> NNTP-Posting-Host: 3CrKQyqWAJZHy6zYVP/kUg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 X-Notice: Filtered by postfilter v. 0.8.3 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:53411 Date: 2018-06-28T20:26:29+02:00 List-Id: On 2018-06-28 16:43, J-P. Rosen wrote: > Le 28/06/2018 à 14:08, Vincent a écrit : >> 1. The "Owning Object Aspect" changes the semantics of Access types in Ada. > Yes. This would be a different kind of pointer, safer but less powerful. > For example, it would not be possible to write a circular list with > them. So it is not intended to replace current access types, it would be > something different. I used this strategy in my implementation of linked lists, e.g. when an element is inserted into a list then the original access type is set to null. I don't think this is a universal enough approach to deserve a special class of types. Then, I don't know SPARK good enough, but I wonder why it is not possible to simply contract subprograms like list insert to leave a single access (maybe single circular access) to each list element? It does not look difficult to prove. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de