comp.lang.ada
 help / color / mirror / Atom feed
From: Jere <jhb.chat@gmail.com>
Subject: Re: Preventing private procedure visibility being made public through extension
Date: Thu, 1 Jun 2017 18:07:05 -0700 (PDT)
Date: 2017-06-01T18:07:05-07:00	[thread overview]
Message-ID: <6f2fd92e-d962-4679-ac62-571796f659d7@googlegroups.com> (raw)
In-Reply-To: <ogknbr$4a7$1@franka.jacob-sparre.dk>

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.

  reply	other threads:[~2017-06-02  1:07 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-20 17:33 Preventing private procedure visibility being made public through extension Jere
2017-05-20 20:13 ` AdaMagica
2017-05-20 21:55   ` Jere
2017-05-20 20:32 ` Dmitry A. Kazakov
2017-05-20 22:51   ` Jere
2017-05-21  0:51     ` Jere
2017-05-21  9:16       ` Chris Moore
2017-05-21 22:55         ` Jere
2017-05-21  8:44     ` Dmitry A. Kazakov
2017-05-21 12:19       ` J-P. Rosen
2017-05-21 12:53         ` Dmitry A. Kazakov
2017-05-21 20:06       ` Jere
2017-05-21 21:07         ` Dmitry A. Kazakov
2017-05-21 22:28           ` Jere
2017-05-22  8:52             ` Dmitry A. Kazakov
2017-05-22 13:33               ` AdaMagica
2017-05-22 13:43           ` AdaMagica
2017-05-22 21:17         ` Randy Brukardt
2017-05-25  4:06           ` Jere
2017-05-25 19:39             ` Randy Brukardt
2017-05-25 22:53               ` Jere
2017-05-25 22:57                 ` Jere
2017-05-26 20:46                 ` Randy Brukardt
2017-05-26 22:35                   ` Simon Wright
2018-05-20 11:22                     ` Simon Wright
2018-05-20 12:03                       ` Jere
2017-05-26 22:58                   ` Jeffrey R. Carter
2017-05-30 21:15                     ` Randy Brukardt
2017-06-02  1:07                       ` Jere [this message]
2017-06-02  7:31                         ` Dmitry A. Kazakov
2017-06-02  8:09                         ` Mark Lorenzen
2017-06-02 11:31                         ` Simon Wright
2017-05-22 21:12   ` Randy Brukardt
2017-05-23  7:38     ` Dmitry A. Kazakov
2017-05-21 18:14 ` Robert Eachus
2017-05-21 20:21   ` Jere
2017-05-21 21:09     ` Jeffrey R. Carter
2017-05-21 22:46       ` Jere
2017-05-22 21:24         ` Jeffrey R. Carter
2017-05-25  3:45           ` Jere
2017-05-21 21:20     ` Dmitry A. Kazakov
2017-05-21 21:45       ` Jere
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox