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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2a687662f09731bb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Tue, 24 Jan 2006 17:33:20 -0600 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1132227919.9036.51.camel@sonnenregen> <1132233886.11218.11.camel@sonnenregen> <1w17gk3manse1$.1kcsd6cj5scen$.dlg@40tude.net> <43d5f5cf$1_1@glkas0286.greenlnk.net> <1wq3tkzfwt0bw.1ad4zqlgln451$.dlg@40tude.net> Subject: Re: Don't use the "use" clause Date: Tue, 24 Jan 2006 17:38:12 -0600 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: <6NCdnfd8BcbcJEveRVn-pQ@megapath.net> NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-2ct8jbLu3ZyAUnWme2+574Rj2TDgi3Q3/9k+C6ZN/XkitB4RcDtiJk4Mduryd4Y1wt/DY5pVaUUbcPP!mUKDyf+bc1tTb8QJ2ombyaAWFA+n8KojmdGZBaZKZX5jbDFJEpnP30qPf5jOESUhvuqRLcV/n6CG X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:2618 Date: 2006-01-24T17:38:12-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1wq3tkzfwt0bw.1ad4zqlgln451$.dlg@40tude.net... ... > But Standard cannot be declared within itself, even conceptually! (:-)) > Anyway nested declarations are equivalent to "use"-ing. Not really, direct visibility is a hiding relationship (new items hide old ones); use is a canceling relationship. > I must admit, that I never managed to understand the point of use-haters. > (Probably because they don't have any (:-)) The packages comprise a tree. > With "use"-ing it is levered to a DAG. I would *really* like to be able to > do it without "use" as well, i.e. to have children of multiple parents. But > that's aside. Is the point that all nodes along any path need to be > mentioned? If so, then "use" or not is quite irrelevant. If not then what? > To keep it a tree, then "with" must be outlawed as well. I don't get it. For me at least, it is about being able to find declarations sensibly - without having to rely on fancy tools which necessarily require the code to be complete and compilable. Thus, strict limits on use clauses. Moreover, nested (direct) visibility is for the birds, in all of its forms. I want (and write) prefixes on *all* non-local declarations (with the exception of operators, which I consider a property more than a separate entity). That means that I do generally write Parent.operation for things declared in the parent of a child package. I hate it that the compiler will not allow me to enforce this. Does this mean that I don't want child packages? Not at all; child packages are about extending the parent package. They give access to the entities of the private part that are otherwise not visibility in any way. I don't want any direct visibility on the parent, and think it is a mistake that it is there (it causes various anomolies that we've spent a lot of work eliminating from packages with just context clause relationships). Indeed, I probably would have modeled the child unit as a special kind of context clause, rather than using nesting. Remember the difference between "visibility" (the ability to use an entities name) and "direct visibility" (the ability to an entities name without qualification). I want the former (of course), and only want the latter for local declarations. Summary: "visibility" == good; "direct visibility" == bad (well, at least if not strictly limited). Randy.