comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Ada 95 visibility question
Date: 1997/09/26
Date: 1997-09-26T00:00:00+00:00	[thread overview]
Message-ID: <EH3FF3.6Ho@world.std.com> (raw)
In-Reply-To: 342A7989.219C@catalina-inter.net


In article <342A7989.219C@catalina-inter.net>,
Chris Sparks (Mr. Ada) <mrada@CATALINA-INTER.NET> wrote:
>Wouldn't peek_a_boo be visible since the types are part of the "c" (no
>pun intended) hierarchy?

No.  It's not unreasonable to think that ought to be the case, but the
actual rules in the RM say otherwise.  As I said, it's a subtle issue.

You inherit from your parent, not your grandparent.  You inherit stuff
from your grandparent only because your parent inherited those things.
And your visibility on those things depends on your visibility of your
parent.  In this case, you know who your grandparent is, and you know it
has the Peek_A_Boo component, but you don't know *you* have that
component.  It's just a minor oddity caused by Ada's model of always
having an imaginary (implicit) declaration for these things, which
occurs (or is imagined to occur) in some well-defined place in the
program.

- Bob




  parent reply	other threads:[~1997-09-26  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-25  0:00 Ada 95 visibility question Chris Sparks (Mr. Ada)
1997-09-25  0:00 ` Bruce Link
1997-09-25  0:00   ` Tucker Taft
1997-09-26  0:00 ` Robert A Duff [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-09-20  0:00 Tom Moran
1997-09-22  0:00 ` Robert A Duff
replies disabled

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