From: "Dan'l Miller" <optikos@verizon.net>
Subject: Re: Visibility of Indexing aspects
Date: Wed, 25 Jul 2018 19:41:33 -0700 (PDT)
Date: 2018-07-25T19:41:33-07:00 [thread overview]
Message-ID: <aeeb29f7-86d1-4b18-9312-03e1239f22b0@googlegroups.com> (raw)
In-Reply-To: <pjb3l6$u7v$1@franka.jacob-sparre.dk>
On Wednesday, July 25, 2018 at 7:12:24 PM UTC-5, Randy Brukardt wrote:
> "Dan'l Miller" wrote in message
> news:3eebe2fb-f066-4248-9b2f-1db32497fd82@googlegroups.com...
> On Wednesday, July 25, 2018 at 2:58:44 PM UTC-5, AdaMagica wrote:
> >> Much ado about nothing.
> >>
> >> The writer of this code erroneously put things in the private part which
> >> should have been public. There is a compiler bug leaking from privacy
> >>which seduced the writer into thinking that his wrong code is correct.
> >>
> >> The RM is very precise about this, see the references in this thread.
> >>
> >> Love's Labours Lost with any further discussion.
> >
> >In other words, I made an insightful good point ...
>
> Sounds like babble to me. What's used by the client has to be public,
> period.
>
> ...
> >The _LRM_'s forcing of {Reference, Reference_Holder, Container_Array, ...}
> >to be public declarations ...
>
> ...is perfectly fine -- there's nothing wrong or dangerous with using them
> directly. Indeed, "indexing" is just a shorthand for a longer call involving
> Reference -- you're always allowed to make the longer call
Yeah, unyieldingly demanding that unnecessary feature is the root-cause of the violation of Steelman 3-5B detailed far below.
In effect as explained in detail far below, Steelman 3-5F is requiring the ability to optionally have this scenario in addition to _AARM_:2016's ¶22/3 of §4.1.6 on page 189, by burying {Find, Data} in private view with only IB and its Variable_Indexing aspect in public view:
from outside the package:
Find (IB,"pear").Data.all := Element'(...); -- illegal
IB.Find ("pear").Data.all := Element'(...); -- illegal
IB.Find ("pear") := Element'(...); -- illegal
IB ("pear") := Element'(...); -- allowed
IB ("pear").Data.all := Element'(...); -- illegal
> , just like you
> are allowed to put in .all even if you could have omitted it. We went to
> substantial lengths to ensure that you can't keep a reference value longer
> than the existence of the return object from Reference -- regardless of how
> you use the package. (Telling people not to do something is never an
> effective technique for safety!)
>
> If you have declarations that *can't* be used directly, then put them into
> the private part. But you're never supposed to be getting a half-and-half
> situation.
>
> Randy.
So which part of the definition of “declaration” does each member d of {Reference, Reference_Holder, Container_Array} not satisfy with respect to Steelman 3-5B's “In particular, it shall be possible to prevent external reference to ••any declaration•• within the encapsulation including automatically defined operations …”? Or is it that each d fails to satisfy the definition of “any”? Because the only way to satisfy Steelman 3-5B and still have the _LRM_'s current wording hold regarding all of {Variable_Indexing aspect, Reference, Reference_Holder, Container_Array} absolutely being in the public view is for somehow someone to demonstrate how Reference isn't “any declaration”, Reference_Holder isn't “any declaration”, and Container_Array isn't “any declaration”.
It does quite clearly say “any declaration” there in Steelman 3-5B. Indeed, 3-5B even wisely predicts the precise situation of implicitly/automatically compiler-generated operations (e.g., the Variable_Indexing aspect) in the “including automatically defined operations”. It seems that Steelman 3-5B is overtly requiring the ability to declare Variable_Indexing in the public part of the package with {Reference, Reference_Holder, Container_Array} in the private part of the package, due to:
1) Variable_Indexing be 3-5B's “including automatically-defined operations”;
2) Reference clearly fully satisfies the definition of 3-5B's “any declaration”;
3) Reference_Holder clearly fully satisfies the definition of 3-5B's “any declaration”;
4) Container_Array clearly fully satisfies the definition of 3-5B's “any declaration”;
5) In the current wording of the _LRM_, “an encapsulation” of {Reference, Reference_Holder, Container_Array} shall ••not•• be capable of “inhibit[ing] external access to implement properties of the definition” of public declaration of the Variable_Indexing aspect on the incomplete declaration of Container.
Therefore because of the “••not•• capable of” there, Steelman 3-5B is clearly not satisfied for Container's Variable_Indexing with respect to declarations of each of {Reference, Reference_Holder, Container_Array}.
Steelman 3-5B grants no exception for ‘chain migration’ of one declaration (e.g., public declaration of Variable_Indexing) having the tenacity to •pull• (or should I say, •pollute•) declarations forcibly from should-have-been private declaration-list into being •forced• public declarations. Indeed, not only does Steelman 3-5B not grant such a chain-migration pulling of declarations from private to public (or should I say, polluting public view with should-have-been private declarations), Steelman 3-5B goes the extra mile in precluding any exceptions whatsoever, even overtly calling out this very situation of automatically generated operations 3 decades ahead of time as not being an exception to the requirement.
It seems that modern Ada's compliance with Steelman 3-5B needs to be downgraded from full to partial due to this topic (and perhaps any other yet-to-be-discovered aspects' chain-migrations of should-have-been private declarations to forced-public declarations).
next prev parent reply other threads:[~2018-07-26 2:41 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-14 14:18 Visibility of Indexing aspects Jere
2018-07-14 17:04 ` Shark8
2018-07-14 18:29 ` Jere
2018-07-14 18:41 ` Dmitry A. Kazakov
2018-07-14 23:00 ` Shark8
2018-07-14 23:28 ` Jere
2018-07-15 14:41 ` AdaMagica
2018-07-15 15:33 ` Jere
2018-07-16 3:22 ` AdaMagica
2018-07-17 0:35 ` Jere
2018-07-17 9:46 ` AdaMagica
2018-07-17 10:11 ` AdaMagica
2018-07-20 12:08 ` Jere
2018-07-20 16:11 ` AdaMagica
2018-07-20 22:03 ` Dan'l Miller
2018-07-20 22:07 ` Jere
2018-07-21 10:33 ` AdaMagica
2018-07-24 3:32 ` Randy Brukardt
2018-07-24 17:15 ` Dan'l Miller
2018-07-25 5:37 ` Randy Brukardt
2018-07-25 18:26 ` Dan'l Miller
2018-07-25 19:58 ` AdaMagica
2018-07-25 20:57 ` Dan'l Miller
2018-07-26 0:12 ` Randy Brukardt
2018-07-26 2:41 ` Dan'l Miller [this message]
2018-07-26 19:09 ` Randy Brukardt
2018-07-26 20:31 ` Shark8
2018-07-26 21:25 ` Dan'l Miller
2018-07-27 22:05 ` Randy Brukardt
2018-07-28 0:35 ` Dan'l Miller
2018-07-27 21:58 ` Randy Brukardt
2018-07-20 22:23 ` Jere
2018-07-20 22:25 ` Jere
2018-07-21 5:58 ` J-P. Rosen
-- strict thread matches above, loose matches on Subject: below --
2018-08-02 20:31 Randy Brukardt
2018-08-03 0:43 ` Dan'l Miller
2018-08-03 20:56 ` Randy Brukardt
2018-08-03 21:32 ` Dan'l Miller
2018-08-06 21:46 ` Randy Brukardt
2018-08-06 22:12 ` Dmitry A. Kazakov
2018-08-07 15:13 ` Dan'l Miller
2018-08-07 22:41 ` 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