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!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: interfaces and limited/controlled/limited-controlled types Date: Sat, 27 Jan 2018 01:12:42 -0600 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Sat, 27 Jan 2018 07:12:43 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="13266"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:50175 Date: 2018-01-27T01:12:42-06:00 List-Id: "Alejandro R. Mosteo" wrote in message news:p4f2oa$c4u$1@dont-email.me... ... > I just was lamenting myself recently for not recalling this idea for the > next revision. Just add new interfaces with the same semantics. That would probably work for Root_Storage_Pool and Root_Streams as these generally don't have any associated implementation. For controlled, however, a common implementation strategy is to build the overhead into the root type (the chaining components that are common to all controlled object). Interfaces can't have components, and the work to allow that in this one case is roughly equivalent to allowing all interfaces to have components (which of course is full multiple inheritance -- which would make Dmitry happy :-). I don't see any point in doing a massive amount of work inside the compiler and not letting users have access to it. So it essentially is full MI or bust here (and I personally vote for bust :-). > I wonder if there are technical problems besides having a duplicated > feature. If there is any concrete implementation associated with the root type, then an interface is not a useful replacement. You would need multiple inheritance to work for abstract types (in which case interfaces are a junk redundant feature). Most likely, existing vendors would just forget about upgrading their compilers (that seems to be the case for some vendors anyway, wouldn't want to make it a perfect sweep :-). Randy.