comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Anonymous Access and Accessibility Levels
Date: Wed, 24 Apr 2019 18:21:57 -0500
Date: 2019-04-24T18:21:57-05:00	[thread overview]
Message-ID: <q9qr2l$m6d$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: a45b6efd-28da-46ab-9d5e-d5f3423a8f99@googlegroups.com

"Jere" <jhb.chat@gmail.com> wrote in message 
news:a45b6efd-28da-46ab-9d5e-d5f3423a8f99@googlegroups.com...
> On Wednesday, April 24, 2019 at 6:34:03 AM UTC-4, Jere wrote:
>> In either case, I am still interested in understanding those specific
>> things I asked earlier.  In particular, if the issues I outlined
>> in Test_AA_2 and Test_AA2 GNAT bugs or some special case rule that
>> I am missing.
>
> Sorry, meant Test_AA_2 and Test_AA_3 there.

I discussed this before, but you might have missed it. There are special 
rules for discriminants in many different contexts, so there is no "gut 
feel" that you can use with them. One can only read the rules in detail for 
each particular case. Generally, it's not worth the effort.

I remember (I haven't looked back at your test) that you had some function 
returns involved. That's one of the special cases, and I'm pretty sure those 
were legal.

In any case, I don't believe that dynamic accessibility checking buys 
anything at all. Indeed, 98% of my code has to resort to 'Unchecked_Access 
in order to be compilable at all. I generally wrap the uses in a controlled 
type that cleans up the accesses as needed (that's how Claw works, for 
instance). The dynamic checks are mainly a hazard to be avoided rather than 
anything helpful. (Unlike a static check, it's hard to prove that a dynamic 
check can't fail, so it remains as a hazard for a future call added in 
maintenance.)

                                                      Randy.


      reply	other threads:[~2019-04-24 23:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-20 15:29 Anonymous Access and Accessibility Levels Jere
2019-04-20 15:58 ` J-P. Rosen
2019-04-22 22:03   ` Randy Brukardt
2019-04-24 10:42   ` Jere
2019-04-24 23:27     ` Randy Brukardt
2019-04-26  2:47       ` Optikos
2019-05-11 11:58         ` Jere
2019-04-26 17:12     ` G.B.
2019-05-11 12:06       ` Jere
2019-05-14  0:03         ` Randy Brukardt
2019-04-22 22:11 ` Randy Brukardt
2019-04-22 22:23   ` Shark8
2019-04-23 23:42     ` Randy Brukardt
2019-04-23  7:44   ` Dmitry A. Kazakov
2019-04-23 23:47     ` Randy Brukardt
2019-04-24 10:34   ` Jere
2019-04-24 10:44     ` Jere
2019-04-24 23:21       ` Randy Brukardt [this message]
replies disabled

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