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!.POSTED!not-for-mail From: G. B. Newsgroups: comp.lang.ada Subject: Re: Ada Successor Language Date: Tue, 19 Jun 2018 07:35:29 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <5e86db65-84b9-4b5b-9aea-427a658b5ae7@googlegroups.com> <878t7u1cfm.fsf@nightsong.com> <776f3645-ed0c-4118-9b4d-21660e3bba4b@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 19 Jun 2018 07:35:29 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="a33f38588384ea41b8f1a0e26ac9a229"; logging-data="20745"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19oz1PsTWWQL1yTaekPF3Rv61Oi0gJXO68=" User-Agent: NewsTap/5.3.1 (iPhone/iPod Touch) Cancel-Lock: sha1:Icv5n+zu35inU2XjycdcG/bnvO8= sha1:ugamcQAFRGkPAHlBwwq8eysu1v4= Xref: reader02.eternal-september.org comp.lang.ada:53155 Date: 2018-06-19T07:35:29+00:00 List-Id: Shark8 wrote: > I'd honestly like the ability to use X'Type; this would allow us to say > something like this: > > Procedure Swap( A, B : in out Some_Type ) is > Temp : Constant B'Type := B; > Begin > B:= A; > A:= Temp; > End Swap; > > Yeah, I know, it's a little thing and you can do it with generics, etc. > But that's not entirely the point, the point is that this allows the > declaration of types dependent on objects... it provides some of the > niceties of type-inference without having to resort to such > lazy/possibly-error-prone methodologies. > What is the ‘Size of B’Type?