From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,57228cde5a9481bb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-18 14:22:24 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!paladin.american.edu!europa.eng.gtefsd.com!news.mathworks.com!news.kei.com!eff!blanket.mitre.org!linus.mitre.org!linus!mbunix!eachus From: eachus@spectre.mitre.org (Robert I. Eachus) Newsgroups: comp.lang.ada Subject: Re: Change to obscure visibility rule in 9x Followup-To: comp.lang.ada Date: 18 Oct 94 15:23:06 Organization: The Mitre Corp., Bedford, MA. Message-ID: References: NNTP-Posting-Host: spectre.mitre.org In-reply-to: graham@clsi.COM's message of 18 Oct 1994 13:44:58 GMT Date: 1994-10-18T15:23:06+00:00 List-Id: 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...