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 X-Received: by 10.107.19.219 with SMTP id 88mr16375005iot.130.1501683819716; Wed, 02 Aug 2017 07:23:39 -0700 (PDT) X-Received: by 10.36.39.140 with SMTP id g134mr246994ita.7.1501683819685; Wed, 02 Aug 2017 07:23:39 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!u14no489958ita.0!news-out.google.com!12ni634itl.0!nntp.google.com!u14no114549ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 2 Aug 2017 07:23:39 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.72.190.54; posting-account=7Oy7OQoAAABhVYFOo553Cn1-AaU-bSfl NNTP-Posting-Host: 76.72.190.54 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <38d8560e-7bb3-450c-9e49-229f8a7adea6@googlegroups.com> Subject: Re: T'Interface attribute From: Eryndlia Mavourneen Injection-Date: Wed, 02 Aug 2017 14:23:39 +0000 Content-Type: text/plain; charset="UTF-8" Xref: news.eternal-september.org comp.lang.ada:47557 Date: 2017-08-02T07:23:39-07:00 List-Id: On Wednesday, August 2, 2017 at 8:43:41 AM UTC-5, Dmitry A. Kazakov wrote: > In order to reduce name space contamination I would propose attribute > T'Interface which for any tagged type T would denote an interface type > with all *new* primitive operations, e.g. > > type Derived is new Parent with ...; > not overriding procedure Foo (X : Derived); > > is equivalent to > > type Derived'Interface is [limited etc] interface; > procedure Foo (X : Derived'Interface); > > type Derived is new Parent and Derived'Interface with ...; > > T'Interface is visible at the declaration point of T. Its use is same as > of T. E.g. prior to the freezing point of T is "premature". > > Question. If T has any discriminants so does T'Interface. > > -- > Regards, > Dmitry A. Kazakov > http://www.dmitry-kazakov.de I believe this is a good idea. Regarding discriminants: Yes, they should extend to T'Interface, and T'Interface should be able to add discriminants, as desired/necessary.