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!paganini.bofh.team!weretis.net!feeder4.news.weretis.net!news.szaf.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Comparing Access Types Date: Wed, 15 Nov 2017 19:13:20 -0600 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Thu, 16 Nov 2017 01:13:21 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="16548"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: feeder.eternal-september.org comp.lang.ada:48927 Date: 2017-11-15T19:13:20-06:00 List-Id: "Jere" wrote in message news:b3976d73-296f-4958-bfb2-26bf49901a48@googlegroups.com... ... > Also, why weren't <, >, <=, >= provided for access types. Even if the > representation of an Access type is implementation defined, surely > those operators could have been defined. They could have been, but they don't mean anything. One needs "=" and "/=" for null checks and direct pointer comparisons. As Dmitry notes, "<" doesn't have a clear meaning for a segmented machine (comparing a code pointer and a data pointer is meaningless). Moreover, nothing in Ada says that an access value has to have any obvious relationship to a physical machine address. The Ada 83 design considered the idea that an access value might be a handle or some other sort of indirect value. (That's a bit different for a general access type, but even there the values are effectively unordered.) If you need ordering, use System.Address. Better yet, don't use access types or addresses in your public interfaces at all -- your clients will be a lot happier for it. (YMMV.) Randy.