From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: Change to obscure visibility rule in 9x
Date: 18 Oct 94 15:23:06
Date: 1994-10-18T15:23:06+00:00 [thread overview]
Message-ID: <EACHUS.94Oct18152306@spectre.mitre.org> (raw)
In-Reply-To: graham@clsi.COM's message of 18 Oct 1994 13:44:58 GMT
You seem to be right. I just reread RM9X5.0, and the wording
changes seem to have lost this detail. ("A declaration" is hidden,
not "all declarations."
Now as to why. During the declaration of a subprogram, its
parameter and result profile cannot be determined, in other
declarations similar things happen. So to avoid requiring compilers
to do handsprings to determine whether or not a particular declaration
with the same name is hidden, they all are.
But why "neither by selection nor directly"? Because you can have
qualified names that name the current declaration or a component of
it. How do you know whether or not the current unit is a (possible)
match of the qualified name? Again, it is a nasty recursion, and
since it is also bad programming, the easiest rule is to make all the
problem cases illegal.
There are a few cases which are considered stylisticly acceptable,
and the rules specifically allow such constructs as:
package Float_IO is new Text_IO.Float_IO;
procedure Reset renames Very_Long_Package_Name.Reset;
--
Robert I. Eachus
with Standard_Disclaimer;
use Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...
next prev parent reply other threads:[~1994-10-18 15:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-10-18 13:44 Change to obscure visibility rule in 9x Paul Graham
1994-10-18 15:23 ` Robert I. Eachus [this message]
[not found] <GRAHAM.94Oct18094458@clsi.clsi.com>
1994-10-18 17:38 ` Bob Duff
1994-10-20 4:01 ` Paul Graham
[not found] ` <GRAHAM.94Oct20000151@canopus.clsi.com>
1994-10-20 14:46 ` Bob Duff
-- strict thread matches above, loose matches on Subject: below --
1994-10-19 9:39 Simtel20 Transfer
[not found] <INFO-ADA%94101904360935@vm1.nodak.edu>
1994-10-19 12:33 ` Bob 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