From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Controlled types as interfaces
Date: Thu, 21 Aug 2014 17:48:53 -0500
Date: 2014-08-21T17:48:53-05:00 [thread overview]
Message-ID: <lt5t0n$f25$1@loke.gir.dk> (raw)
In-Reply-To: 1O1Jv.11735$8G3.5145@fx12.iad
"Brad Moore" <brad.moore@shaw.ca> wrote in message
news:1O1Jv.11735$8G3.5145@fx12.iad...
> On 14-08-20 06:50 AM, Victor Porton wrote:
...
> The incompatibilities are described in the discussion section of the AI,
> but these had to do with problems of changing Root_Stream_Type into an
> interface.
>
> However, I believe you are correct that if we modified Root_Stream_Type to
> remain an abstract type that inherits from a Root_Stream_Interface, then
> these incompatibilities would not exist.
No, sorry, they're the same. The problem is that Ada doesn't allow hidden
inheritance (in any way) of an interface.
If Root_Stream_Type is an interface, or inherits from an interface, then it
cannot be used in the full type definition of a private type. That's the
backwards incompatibility.
> Backward incompatibilities are to be avoided if at all possible, so I
> think if we were to go forward with this AI, your suggestion to make
> Root_Stream_Type inherit from a Root_Stream_Interface, might be the way to
> go.
We've already discussed that as-nausem. My personal opinion (in the case of
Root_Stream_Type) is that there isn't any good reason to use this in a
hidden way, so we could just make it an interface and swallow the
incompatibility. (When I suggested that at a meeting, though, it got no
traction.)
But that's not true for Controlled. The vast majority of the types I define
are tagged private where the full type is derived from Controlled (or
Limited_Controlled).
The most recent versions of AI12-0023-1 were trying to find ways to lift the
ban against hidden interfaces for a restricted set of interfaces. It's the
only way to do this without incompatibilities for existing uses. My
recollection is that it wasn't going well (but we haven't worked on that
since the Stockholm meeting more than a year ago).
Randy.
next prev parent reply other threads:[~2014-08-21 22:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 1:05 Controlled types as interfaces Victor Porton
2014-08-20 1:09 ` Victor Porton
2014-08-20 7:29 ` Dmitry A. Kazakov
2014-08-20 12:49 ` Victor Porton
2014-08-20 13:47 ` Dmitry A. Kazakov
2014-08-21 23:16 ` Randy Brukardt
2014-08-29 15:01 ` Robert A Duff
2014-08-29 23:54 ` Randy Brukardt
2014-08-20 12:50 ` Victor Porton
2014-08-20 13:38 ` Dmitry A. Kazakov
2014-08-20 13:56 ` Brad Moore
2014-08-21 22:48 ` Randy Brukardt [this message]
2014-08-20 1:41 ` Victor Porton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox