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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.36.79.80 with SMTP id c77mr1172209itb.4.1510327221000; Fri, 10 Nov 2017 07:20:21 -0800 (PST) X-Received: by 10.157.12.211 with SMTP id o19mr385453otd.0.1510327220929; Fri, 10 Nov 2017 07:20:20 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer02.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!186no69199itu.0!news-out.google.com!193ni3024iti.0!nntp.google.com!186no69198itu.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 10 Nov 2017 07:20:20 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.71.208.22; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 173.71.208.22 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Comparing Access Types From: Jere Injection-Date: Fri, 10 Nov 2017 15:20:20 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Body-CRC: 693414254 X-Received-Bytes: 2847 Xref: feeder.eternal-september.org comp.lang.ada:48803 Date: 2017-11-10T07:20:20-08:00 List-Id: On Thursday, November 9, 2017 at 5:38:41 PM UTC-5, Robert A Duff wrote: > "Dmitry A. Kazakov" writes: > > > No, in general case it cannot, in the spirit of the semantics that A < B > > if the physical machine address of A < B. > > I agree with you that "<" makes little sense for access types. > Even in C, "<" on pointers is undefined unless they point > into the same array. I'm not hugely in disagreement here, but I am curious as to why it doesn't make sense. My impression of access types is that they hold some sort of information used to locate/manage an object and that they must be unique for unique objects (that is two access types pointing to two separate objects cannot have identical implementation values under the hood). If they must be unique, there is generally a way to order them. I'm not suggesting treating them like integers or even exposing how the ordering is done. Again, I am not trying to outright disagree, just understand. In either case, I think I have given up on ordering them and will let the client do as Dmitry suggests (comparing the objects they reference for ordering instead). For debugging purposes, I do wish there was a way for me to get a printable unique value for access types. When I work with incomplete types, 'Address no longer works (with GNAT at least) and there is no 'Image for access types. Any thoughts on that? I'm trying to trace the inner workings of a type that holds access types internally but since the access types are for incomplete types, I'm having trouble doing that within the generic package.