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: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!feeder.ecngs.de!ecngs!feeder2.ecngs.de!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Accessibility checks Date: Thu, 18 Jul 2013 23:48:41 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <87mwplvthn.fsf@mid.deneb.enyo.de> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1374209324 24969 69.95.181.76 (19 Jul 2013 04:48:44 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 19 Jul 2013 04:48:44 +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.6157 X-Original-Bytes: 3347 Xref: number.nntp.dca.giganews.com comp.lang.ada:182581 Date: 2013-07-18T23:48:41-05:00 List-Id: "Bill Findlay" 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" > wrote: > >> "Jeffrey Carter" 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.