comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Accessibility checks
Date: Thu, 18 Jul 2013 23:48:41 -0500
Date: 2013-07-18T23:48:41-05:00	[thread overview]
Message-ID: <ksagfb$oc9$1@loke.gir.dk> (raw)
In-Reply-To: CE0CF7DE.329A0%yaldnif.w@blueyonder.co.uk

"Bill Findlay" <yaldnif.w@blueyonder.co.uk> wrote in message 
news:CE0CF7DE.329A0%yaldnif.w@blueyonder.co.uk...
> On 18/07/2013 00:44, in article ks7a8v$4nj$1@loke.gir.dk, "Randy Brukardt"
> <randy@rrsoftware.com> wrote:
>
>> "Jeffrey Carter" <spam.jrcarter.not@spam.not.acm.org> wrote in message
>> news:ks718g$aim$2@dont-email.me...
>
>>> Brukardt, ARG member and editor of the ARM, claims that 'Access never
>>> works and 'Unchecked_Access is always required, bypassing the
>>> accessibility checks. While this is not entirely true, it's quite common
>>> that one must use 'Unchecked_Access, so we could do without these rules
>>> and checks in the majority of cases.
>>
>> That's not entirely true: I did find one (and only one) instance where I 
>> was
>> able to use 'Access in my code (it had to do with a library-level
>> initialization).
>
> Interesting.
>
> My projects have 37 occurrences of 'Access and only 2 of 
> 'Unchecked_Access.

I recall Tucker telling me (after one of my frequent rants about the 
uselessness of 'Access) that he used it quite often. He then deconstructed 
several possible uses for access values constructed from static objects, and 
noted that some of them fit 'Access very well, and others did not. (His 
description was much more useful than this summary, of course; he is so much 
better that me at being able to summarize ideas. That's one trait that I've 
never managed to learn, despite many examples; I'm almost always happy when 
Tucker jumps into a discussion because he often explains the issue much more 
clearly than I did. But I digress...)

I tend to use 'Access on parameters to for temporary storage during 
processing in a package (Claw does this extensively), and in that case, 
accessibility is completely in the way. We use finalization to ensure the 
saved values don't live too long, a static check is never going to work.

OTOH, creating values at initialization, for instance, works perfectly, and 
the static check is helpful. So this is a case where we have rules that help 
some programming usages and hinder others -- still not the best choice of 
programming rules.

                                    Randy. 




  parent reply	other threads:[~2013-07-19  4:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 20:09 Accessibility checks Florian Weimer
2013-07-17 20:20 ` Alan Jump
2013-07-17 21:16 ` Jeffrey Carter
2013-07-17 23:44   ` Randy Brukardt
2013-07-18  0:39     ` Bill Findlay
2013-07-18  7:14       ` Simon Wright
2013-07-19  8:41         ` Georg Bauhaus
2013-07-19  4:48       ` Randy Brukardt [this message]
2013-07-22  6:11       ` ake.ragnar.dahlgren
2013-07-22  9:03         ` Bill Findlay
2013-07-24 13:01           ` ake.ragnar.dahlgren
2013-07-24 13:27             ` Dmitry A. Kazakov
2013-07-29  6:18               ` ake.ragnar.dahlgren
2013-07-18  0:41     ` Jeffrey Carter
2013-07-19  4:51       ` Randy Brukardt
replies disabled

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