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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.200.51.199 with SMTP id d7mr2146503qtb.6.1496365625842; Thu, 01 Jun 2017 18:07:05 -0700 (PDT) X-Received: by 10.157.52.232 with SMTP id t37mr102193otd.15.1496365625793; Thu, 01 Jun 2017 18:07:05 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!t26no334451qtg.1!news-out.google.com!k7ni2475itk.0!nntp.google.com!67no540926itx.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 1 Jun 2017 18:07:05 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.71.201.205; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 173.71.201.205 References: <4a47e4cd-829c-4451-abf1-82cf60b67706@googlegroups.com> <9cdf04e6-123e-4bd9-b466-77aad00d61bb@googlegroups.com> <62e326e6-dd15-4546-83dc-b1e423327c23@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6f2fd92e-d962-4679-ac62-571796f659d7@googlegroups.com> Subject: Re: Preventing private procedure visibility being made public through extension From: Jere Injection-Date: Fri, 02 Jun 2017 01:07:05 +0000 Content-Type: text/plain; charset="UTF-8" Xref: news.eternal-september.org comp.lang.ada:46877 Date: 2017-06-01T18:07:05-07:00 List-Id: On Tuesday, May 30, 2017 at 5:15:20 PM UTC-4, Randy Brukardt wrote: > "Jeffrey R. Carter" wrote in message > > On 05/26/2017 10:46 PM, Randy Brukardt wrote: > >> Ah, a subtype. GNAT has (or had?)a bug having to do with making things > >> visible because of a subtype declaration (I recall someone else running > >> across that and having verified it myself). That's just plain wrong, a > >> subtype has no effect on what's visible in a prefixed call (or anywhere > >> else > >> for that matter, in particular with "use all type"). > > > > That was me. I wasn't aware that you had verified it as a compiler error. > > I don't recall the details anymore, but I'm pretty sure I discussed that > with someone at AdaCore. (Either in the context of an ACATS test, or just on > the side of some other conversation.) And they agreed it was wrong. No idea > if it formally got reported though. > > Randy. Thanks for the verification on that (and thanks to Simon for checking a more recent version). I went to the Adacore website but it looks like all of their bug submission options require you to be a paying customer. I'll have to figure out a way to report this to Adacore (or is there a different route?). What are your thoughts on this suggestion: Generally, constructing operations don't need to be primitive. In some other languages, constructors are not primitive at all and can neither dispatch nor be overridden. It would be nice if Ada provided a more straightforward way to set a procedure or function as not primitive. I know you can put them in another package (or a subpackage), but that leads to really clumsy naming schemes for some packages or unnecessary extra files. I don't know enough to say what the right way to do it would be. I feel an extra keyword is overkill, but I don't know if either aspects or attributes would be a viable alternative ( with Primitive => False or for My_Function'Primitive use False). It wouldn't need to cause freezing, but just prevent extensions from inheriting or dispatching to them. If I am using primitive incorrectly, I apologize. Hopefully my meaning is at least decipherable.