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!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!fx12.iad.POSTED!not-for-mail From: Brad Moore User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Controlled types as interfaces References: <17zg1do470nci.15209dgoz3ktk.dlg@40tude.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <1O1Jv.11735$8G3.5145@fx12.iad> NNTP-Posting-Host: 68.145.219.148 X-Complaints-To: internet.abuse@sjrb.ca X-Trace: 1408542973 68.145.219.148 (Wed, 20 Aug 2014 13:56:13 UTC) NNTP-Posting-Date: Wed, 20 Aug 2014 13:56:13 UTC Date: Wed, 20 Aug 2014 07:56:15 -0600 X-Received-Bytes: 2452 X-Received-Body-CRC: 1154663317 Xref: news.eternal-september.org comp.lang.ada:21855 Date: 2014-08-20T07:56:15-06:00 List-Id: On 14-08-20 06:50 AM, Victor Porton wrote: > Dmitry A. Kazakov wrote: > >>> A similar thing can be made with Root_Stream_Type making it derived from >>> Root_Stream_Interface interface. >> >> Yes, of course. It was proposed multiple times, as I remember. But >> rejected as "not backward compatible." Though the compatibility issue was >> quite minor if any. > > We can make Root_Stream_Type a descendant of Root_Stream_Interface. > > So old code can derive from Root_Stream_Type and this is backward > compatible. > There is an amendment AI for this already, for Ada 202x. See AI12-0023-1 ( http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0023-1.txt?rev=1.3&raw=Y ) This AI has not been rejected (yet), as all amendment AI's that are proposals for Ada 202X are only proposals at this point. At some point in the future when it comes time to start selecting which proposals are worth having, this AI may or may not make the cut. 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. 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. Brad