comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Class-wide types algebra
Date: Tue, 27 Sep 2016 19:05:43 -0500
Date: 2016-09-27T19:05:43-05:00	[thread overview]
Message-ID: <nsf1g3$1jb$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: nr8rah$14gp$1@gioia.aioe.org

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message 
news:nr8rah$14gp$1@gioia.aioe.org...
> ... E.g.
>
>    type Root_Stream_Type is ...
>
> OK, that was a mistake, it should have been
>
>    type Root_Stream_Interface is limited interface;
>    type Root_Stream_Type is abstract new Root_Stream_Interface
>       with private;

We would have made the above change years ago if it wasn't severely 
incompatible.

> With T'Interface you could still work it around:

But you'd still have the problem that interfaces can't be hidden (which is 
the source of the incompatibility). And lifting that restriction would be a 
nightmare (we've tried on several occasions), as you quickly get scenarios 
where you have to have two different copies of the same interface in order 
to keep sanity about the operations. (Else one has to totally abandon 
privacy, allowing hidden operations to be overridden. That leads to usage 
madness...)

The problem with all forms of MI is diamond inheritance, which get much 
worse in Ada because of our strict privacy rules. I don't think that could 
ever be solved for Ada (perhaps a new language could solve it, but not Ada).

                                         Randy.



  reply	other threads:[~2016-09-28  0:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 20:26 Class-wide types algebra Dmitry A. Kazakov
2016-09-12 21:12 ` rieachus
2016-09-12 21:39   ` Dmitry A. Kazakov
2016-09-13 11:46     ` rieachus
2016-09-13 12:26       ` Dmitry A. Kazakov
2016-09-28  0:05         ` Randy Brukardt [this message]
2016-09-28  7:31           ` Dmitry A. Kazakov
2016-09-28 20:17             ` Randy Brukardt
2016-09-29  8:06               ` Dmitry A. Kazakov
2016-09-29 18:44                 ` Randy Brukardt
2016-09-29 19:55                   ` Dmitry A. Kazakov
2016-10-01  5:47                     ` Randy Brukardt
2016-10-01  8:35                       ` Dmitry A. Kazakov
2016-10-05 20:42                         ` Randy Brukardt
replies disabled

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