From: Jere <jhb.chat@gmail.com>
Subject: Re: Visibility of Indexing aspects
Date: Sat, 14 Jul 2018 11:29:43 -0700 (PDT)
Date: 2018-07-14T11:29:43-07:00 [thread overview]
Message-ID: <7742818a-8789-4a0d-b420-e170a89dcf5e@googlegroups.com> (raw)
In-Reply-To: <c33b46b9-f08e-4e33-ace3-4cb83a13197b@googlegroups.com>
On Saturday, July 14, 2018 at 1:04:49 PM UTC-4, Shark8 wrote:
> On Saturday, July 14, 2018 at 8:18:38 AM UTC-6, Jere wrote:
> > I was going through an Ada library and noticed that they
> > were able to add an indexing aspect to a type in the private
> > section of a package but have the indexing work for types
> > declared using the public view of the type. It's a neat feature,
> > but I wasn't sure if this was intentional or a GNAT bug?
> > I searched through sections 13.1 and 4.1.6 of the RM, but no
> > mention that I could find of the private/public requirements
> > for the Variable_Indexing and Constant_Indexing aspects.
> >
> > Is there something I missed in the RM, is this a GNAT bug, or
> > something else?
>
> I'm not sure what your problem is; it's perfectly fine to attach the predicate in the Private section:
I have no problem with it per say, but it runs contrary to how I
have experienced Ada so far, so I wanted to make sure before I
make use of it that it isn't a compiler bug. This marks the first
time I have ever encountered a situation where the client of a
package can leverage functions from the private part of a package.
In my example, I expected that client had no access to any functionality
of the Container type because the public specification for it was:
package Containers is
type Container is private;
private
There was no mention of being able to index the type (publicly), so it
surprised me that a client using the package could call the index
operation. If it was intentional, then that was fine, I just wanted to
know because I couldn't find anything in the RM that forbid it, but I
might have missed something.
next prev parent reply other threads:[~2018-07-14 18:29 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 [this message]
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
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