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!gandalf.srv.welterde.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: how to force the Small aspect of a new type derived from the generic formal type ? Date: Thu, 25 Jan 2018 22:42:03 -0600 Organization: JSA Research & Innovation Message-ID: References: <1aaa851e-495a-4dd4-8db7-0fd84ee8225f@googlegroups.com> Injection-Date: Fri, 26 Jan 2018 04:42:04 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="10620"; 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; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:50157 Date: 2018-01-25T22:42:03-06:00 List-Id: "G. B." wrote in message news:p4d81o$ds4$1@dont-email.me... > Randy Brukardt wrote: >> >> ...; you can't use most representation >> aspects on a type derived from a generic formal type. >> >> Even if you were not in a generic unit, you can't usually put >> representation >> aspects on a derived type (they usually have to match the original type). > > The "usually" calls attention to types derived from others > precisely to make their objects have a representation > that differs from those of the original type. (The case > when a type conversion changes the representation.) > Plausibly, this feature does not blend with types being generic > in any sense. Right, and that feature is only available for types that have no primitive operations. So it's not available for anything defined as an abstract data type or any form of object-oriented design. Thus isn't pretty limited in its value. (It turns out that there is a bug in the rules that allows these rep. changing aspects in some cases where they are not supposed to be -- and it also turns out that users have been using this loophole. Killing the user-defined subprogram part of 13.1(10/4) is one of the things I've been (unsuccessfully) lobbying for for years.) Randy.