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-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Generic package parameters not externally visible : what's the rational ? Date: Tue, 27 Oct 2009 19:34:16 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1256686458 32694 192.74.137.71 (27 Oct 2009 23:34:18 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 27 Oct 2009 23:34:18 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:nEFaJKPJGtHomLncburtXBYc2ww= Xref: g2news2.google.com comp.lang.ada:8818 Date: 2009-10-27T19:34:16-04:00 List-Id: "Randy Brukardt" writes: > I'm not sure that it "makes perfect sense" for them to be visible: it would > surely increase the chance of name collisions outside of the package. Shrug. So you would end up saying "Instance.Element_Type" once in a while. > Indeed, I find that it makes "perfect sense" for them not the visible: they > are not part of the package that gets instantiated. That's clear from the > syntax (they're outside the package). I've always found that syntax odd, for what it's worth. Part of the declarative region of the generic package comes before its name. >... You're going to say that discriminants > are outside of the type, too, but they're also visible. I can't argue with > that beyond saying that that placement of discriminants is just awful; I > place them in the wrong place and continually forget to include them in > aggregates because they're well away from the other components. > > The main point is, it isn't clear either way: both choices aren't ideal. So > one was chosen. And changing it surely would be incompatible, at the very > least with use-visibility (if you start adding names, those names could > become invisible if there are collisions) -- and it is insufficiently broken > to take on that incompatibility. Agreed. I don't think anybody suggesting "fixing" this minor problem -- they just asked for rationale, and I speculated. - Bob