comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: c2ada bug report filed
Date: Thu, 31 Mar 2011 20:07:58 -0500
Date: 2011-03-31T20:07:58-05:00	[thread overview]
Message-ID: <in38hh$gc7$1@munin.nbi.dk> (raw)
In-Reply-To: m24o6jovd3.fsf@pushface.org

"Simon Wright" <simon@pushface.org> 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.





  reply	other threads:[~2011-04-01  1:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-30  8:15 c2ada bug report filed Jerry
2011-03-30 14:15 ` Simon Wright
2011-03-30 20:03   ` Simon Wright
2011-04-02  4:45     ` Jerry
2011-04-04 17:27       ` Simon Wright
2011-04-04 23:46         ` Jerry
2011-03-31 18:01 ` Per Sandberg
2011-03-31 21:03   ` Simon Wright
2011-04-01  1:07     ` Randy Brukardt [this message]
2011-04-01  6:38       ` Simon Wright
replies disabled

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