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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c76d41708bf94f23 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!news2.euro.net!news.mixmin.net!feeder.erje.net!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: c2ada bug report filed Date: Thu, 31 Mar 2011 20:07:58 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <3a657bf9-89ed-45c8-bd4d-f226cb3bc5fa@w7g2000pre.googlegroups.com><4d94c18b$0$4966$a8266bb1@postbox2.readnews.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1301620082 16775 69.95.181.76 (1 Apr 2011 01:08:02 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 1 Apr 2011 01:08:02 +0000 (UTC) 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.5931 Xref: g2news2.google.com comp.lang.ada:19614 Date: 2011-03-31T20:07:58-05:00 List-Id: "Simon Wright" wrote in message news:m24o6jovd3.fsf@pushface.org... ... > I shall have a think about this, the 'access' approach is certainly > neat. There's the question of whether null is allowed; if it is, and > customers are using Ada95, 'access' is ruled out. All anonymous access types in Ada 95 were null excluding; passing "null" to them was not allowed. The ARG recommended that all Ada 95 compilers support "not null" syntactically (it would have no effect at runtime) in order to minimize the incompatibility problems of switching back and forth between Ada 95 and Ada 2005. Don't know if that recommendation was adopted widely (I believe that Janus/Ada does allow it in Ada 95 mode). Either "in" or "access" in Ada 95 would not allow null, so if that is needed, a named access type has to be used. Ada 2005 would require "not null" if null is to be excluded (as noted, Ada 95 compilers are supposed to support that, but who knows how many do). I personally don't like seeing access in any interface that can avoid it. But if you need to be able to pass null, you don't have a choice. If not, I think "in" is preferred. Randy.