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.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.107.40.7 with SMTP id o7mr5058993ioo.105.1518281195637; Sat, 10 Feb 2018 08:46:35 -0800 (PST) X-Received: by 10.157.87.132 with SMTP id q4mr257877oth.2.1518281195359; Sat, 10 Feb 2018 08:46:35 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!w142no323838ita.0!news-out.google.com!m16ni299itm.0!nntp.google.com!o66no323311ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 10 Feb 2018 08:46:35 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.240.214.139; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.240.214.139 References: <5d9134c9-a7d4-468e-8685-ebbb393eabea@googlegroups.com> <13f51bd1-00ef-4d2a-94b9-2d2560b449f3@googlegroups.com> <7781f82a-7df3-4f00-9bc8-ee60c24311f6@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <32ab15a8-6747-41a3-9e2d-02feb7962791@googlegroups.com> Subject: Re: grassroots thoughts on access types From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Sat, 10 Feb 2018 16:46:35 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:50372 Date: 2018-02-10T08:46:35-08:00 List-Id: >It is semantically a pointer, an object that directly references another object. Well, you have a point, but aren't you a bit nitpicking ? I think one can write: type CONTAINER_TYPE is private with Iterable => (First => First, Next => Next Has_Element => Has_Element, Element => Get); type CURSOR is limited private; type ELEMENT is new WHO_CARES; function GET(LIST: COINTAINER_TYPE, CURSOR_OBJECT: CURSOR) return ELEMENT, function FIRST(LIST: CONTAINER_TYPE) return CURSOR; function NEXT(LIST: CONTAINER_TYPE, CURSOR_OBJECT: CURSOR) return CURSOR; function HAS_ELEMENT(LIST: CONTAINER_TYPE, CURSOR_OBJECT: CURSOR) return BOOLEAN; private type CURSOR is POSITIVE; type CONTAINER_TYPE is ... there isn't much difference in my understanding between this numeric CURSOR and a regular array index type. None of the usual problem of dynamic allocation, dangling pointers, unchecked this-or-that here. So I don't really see why it should be forbidden in secure, deterministic Ada subset.