comp.lang.ada
 help / color / mirror / Atom feed
From: Mehdi Saada <00120260a@gmail.com>
Subject: Re: grassroots thoughts on access types
Date: Sat, 10 Feb 2018 08:46:35 -0800 (PST)
Date: 2018-02-10T08:46:35-08:00	[thread overview]
Message-ID: <32ab15a8-6747-41a3-9e2d-02feb7962791@googlegroups.com> (raw)
In-Reply-To: <p5n3ap$rlh$1@dont-email.me>

>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.


  reply	other threads:[~2018-02-10 16:46 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09  0:46 grassroots thoughts on access types Mehdi Saada
2018-02-09  1:23 ` Randy Brukardt
2018-02-09  9:13   ` Simon Wright
2018-02-09 11:06     ` Dmitry A. Kazakov
2018-02-09 12:09 ` Mehdi Saada
2018-02-09 12:11   ` Mehdi Saada
2018-02-09 14:23     ` Simon Wright
2018-02-09 16:11       ` Mehdi Saada
2018-02-09 17:01 ` Jeffrey R. Carter
2018-02-09 17:19   ` Dmitry A. Kazakov
2018-02-09 19:12     ` Jeffrey R. Carter
2018-02-09 20:17       ` Robert A Duff
2018-02-09 21:44         ` Jeffrey R. Carter
2018-02-09 22:06           ` Dmitry A. Kazakov
2018-02-10  0:43             ` Mehdi Saada
2018-02-10  1:51               ` Mehdi Saada
2018-02-10 10:07                 ` Jeffrey R. Carter
2018-02-10 11:57                 ` Mehdi Saada
2018-02-10 14:02                   ` Simon Wright
2018-02-10 15:32                   ` Jeffrey R. Carter
2018-02-10 16:46                     ` Mehdi Saada [this message]
2018-02-10  8:28               ` Dmitry A. Kazakov
2018-02-10 11:55                 ` Mehdi Saada
2018-02-10 14:35                   ` Dmitry A. Kazakov
2018-02-10 16:51                     ` Simon Wright
2018-02-10 17:19                       ` Dmitry A. Kazakov
2018-02-10 10:03             ` Jeffrey R. Carter
2018-02-10 10:36               ` Dmitry A. Kazakov
2018-02-10 11:12                 ` Jeffrey R. Carter
2018-02-10 14:44                   ` Dmitry A. Kazakov
2018-02-10 21:16           ` Robert A Duff
2018-02-11 10:47             ` Jeffrey R. Carter
2018-02-11 21:51               ` Robert A Duff
2018-02-09 20:58       ` Shark8
2018-02-09 20:32 ` G. B.
2018-02-09 20:53   ` Mehdi Saada
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox