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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!reality.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Class-wide types algebra Date: Tue, 27 Sep 2016 19:05:43 -0500 Organization: JSA Research & Innovation Message-ID: References: <2837d915-12c8-4c23-8907-1d146d1abae7@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1475021123 1643 24.196.82.226 (28 Sep 2016 00:05:23 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 28 Sep 2016 00:05:23 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Response Xref: news.eternal-september.org comp.lang.ada:31910 Date: 2016-09-27T19:05:43-05:00 List-Id: "Dmitry A. Kazakov" 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.