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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: Victor Porton Newsgroups: comp.lang.ada Subject: Re: Controlled types as interfaces Date: Wed, 20 Aug 2014 15:49:36 +0300 Organization: Aioe.org NNTP Server Message-ID: References: <17zg1do470nci.15209dgoz3ktk.dlg@40tude.net> NNTP-Posting-Host: AnnUDmZwVERVUXyHDyOl5A.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@aioe.org User-Agent: KNode/4.13.3 X-Notice: Filtered by postfilter v. 0.8.2 Xref: number.nntp.dca.giganews.com comp.lang.ada:188580 Date: 2014-08-20T15:49:36+03:00 List-Id: Dmitry A. Kazakov wrote: > On Wed, 20 Aug 2014 04:09:15 +0300, Victor Porton wrote: > >> Victor Porton wrote: >>> I think in Ada 202X we can invent Limited_Controlled_Interface and >>> Controlled_Interface types derived from which could become controlled. > > Yes, but that would be very complicated, because you could add an > interface very late, making a descendant of a non-controlled type > controlled. > > A better solution would be fixing initialization (AKA constructors) and > leaving controlled kludge as is. I don't see any reason not to make descendant of a non-controlled type controlled. Let T is a non-controlled tagged type. It descendant Q is like a record record Old: T; Ext: Q1; end record; (where Q1 is the difference of Q and T). Q1 is controlled. As there is no problem that this record becomes controlled, there are no reason not to make Q controlled despite of T was non-controlled. -- Victor Porton - http://portonvictor.org