comp.lang.ada
 help / color / mirror / Atom feed
From: Jere <jhb.chat@gmail.com>
Subject: Re: Visibility of Indexing aspects
Date: Fri, 20 Jul 2018 15:07:00 -0700 (PDT)
Date: 2018-07-20T15:07:00-07:00	[thread overview]
Message-ID: <dbc94806-dbf9-408d-b8ad-3a159eb85b24@googlegroups.com> (raw)
In-Reply-To: <c74ed72d-bd55-4864-b569-ed4eae88941c@googlegroups.com>

On Friday, July 20, 2018 at 12:11:13 PM UTC-4, AdaMagica wrote:
> Am Freitag, 20. Juli 2018 14:08:11 UTC+2 schrieb Jere:
> > I was under the impression that scope and visibility were two different
> > things.  If I understand you correctly, it sounds like you are saying
> > that
> > 
> > package Things is
> >    --One scope
> > private
> >    --another scope
> > end Things;
> > 
> > I was under the impression that it was more like:
> > 
> > package Things is
> >    --One scope
> > private
> >    --same scope but different visibility
> > end Things;
> 
> The scope of every declaration start with the place of the declaration, so in a package or any declarative region, there are many scopes, some of which are visible, others not.

I think my confusion comes from being taught that the word scope has a
particular connotation.  Normally a scope exists between two scoping
points ({and } in C/C++, declare/begin and end in Ada and similar
languages).  Based on this discussion though, it seems like Ada has a
different definition that instead starts a an item's specific point
of declaration correct?

> 
> > Also how does this reconcile with:
> > 
> > 8.3 (23.1/3):
> > An attribute_definition_clause or an aspect_specification is
> > visible everywhere within its scope.
> > 
> > That section makes it sound like aspects created in the private
> > section are indeed visible in the public section.
> 
> Why do you think so? 

based on my own confusion mentioned above.  I think I get it now
though.
 
> 
> > Couple that with the section you mentioned:
> > 
> > 8.2(10.1/3) The scope of an aspect_specification is identical to 
> > the scope of the associated declaration.
> 
> "associated" means the declaration (syntax) in which it appears. This is here in the private part in the full declaration, so it's *not* visible in the public part.
> 

Question:  Section 13.1.3 (1/3) says "The declaration with 
the aspect_specification is termed the associated declaration."
In the case of the bugged example I gave, the aspect_specification
was with the full view of the type.  Is that then considered the
declaration of the type, or is just the partial view in the public 
section considered the declaration?  I am assuming the full view
is still considered the declaration.


> BTW: You should definitely report this severe bug to AdaCore.
I'll see if I can figure out a way to word this.  As you can
see, I am not super competent in the RM, so I'm not sure I 
will be able to prove to them it is one.  I'm not a paying
customer (would like to be, but they are out of my price range),
so I normally don't send them bug reports unless I really can
show a verified bug.

  parent reply	other threads:[~2018-07-20 22:07 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 [this message]
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