comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
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
Date: 2018-01-25T22:42:03-06:00	[thread overview]
Message-ID: <p4ebis$abs$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: p4d81o$ds4$1@dont-email.me


"G. B." <nonlegitur@nmhp.invalid> wrote in message 
news:p4d81o$ds4$1@dont-email.me...
> Randy Brukardt <randy@rrsoftware.com> 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. 



      reply	other threads:[~2018-01-26  4:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24 19:16 how to force the Small aspect of a new type derived from the generic formal type ? Mehdi Saada
2018-01-25  3:30 ` Randy Brukardt
2018-01-25 12:54   ` Mehdi Saada
2018-01-26  4:38     ` Randy Brukardt
2018-01-26 11:13     ` Alejandro R. Mosteo
2018-01-25 18:35   ` G. B.
2018-01-26  4:42     ` Randy Brukardt [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox