From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE, XPRIO autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Parameterised 'Image Attributes Date: Wed, 6 Sep 2023 20:04:00 -0500 Organization: A noiseless patient Spider Message-ID: References: <4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com> <41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com> Injection-Date: Thu, 7 Sep 2023 01:03:39 -0000 (UTC) Injection-Info: dont-email.me; posting-host="da6ed571c7c5f886ace69852bbed0cc5"; logging-data="2856088"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19WokQoU1WOHwnEsQYyGHKxtA+GFnlIPFw=" Cancel-Lock: sha1:xxCiA9wEyJ7icYj41G4KMn2MYjg= X-RFC2646: Format=Flowed; Response X-Priority: 3 X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: news.eternal-september.org comp.lang.ada:65610 List-Id: "Dmitry A. Kazakov" wrote in message news:uchukd$1lnvp$1@dont-email.me... > On 2023-08-28 11:18, Stephen Davies wrote: > ... >Neither there is one why 'Image must be a non-overridable attribute There actually is a good reason for this. Attributes have global visibility. So if you allowed overriding of attributes, then a with added or removed in a remote part of a program could silently change the behavior of code that has no knowledge of of the change. That would be bad for "programming in the large". Note that Ada 95 was proven to have no such cases, and we've tried very hard to avoid them. One could imagine adding rather severe restrictions to overriding of attributes to eliminate this problem (for instance, only allowing it for primitive operations of the type), but that would eliminate all real value of the feature (you can always use a primitive function and "use all" to get the same effect without any new features). For 'Image specifically, the design of the attribute doesn't work well for composition (for Image for composite types), which is why Ada 2022 has a separate attribute that can be overridden similar to a stream attribute. Randy.