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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,af3dada69080e420 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-24 07:38:52 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-han1.dfn.de!news-koe1.dfn.de!RRZ.Uni-Koeln.DE!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Interesting effects in array renaming Date: Tue, 24 Jun 2003 14:38:51 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <3EF5E6B8.3030203@spam.com> NNTP-Posting-Host: d2-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1056465531 23240 134.91.1.15 (24 Jun 2003 14:38:51 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Tue, 24 Jun 2003 14:38:51 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/831)) Xref: archiver1.google.com comp.lang.ada:39672 Date: 2003-06-24T14:38:51+00:00 List-Id: Dmitry A. Kazakov wrote: : Georg Bauhaus wrote: : :> I don't think it is so bad, it is much more an issue of what :> renaming means, maybe? : : No, it is an issue of which meaning has an explicit specifying of a subtype. Hm. procedure foo(a: Apple) is p: Orange renames a; may be correct, but confusing. Because, in my view a least, the programmer is violating the usual meaning of "renames". I think the bias is towards the wrong side/word if "Orange" outweighs "renames". :> Most prominently, you give another name :> to an entity, you don't make a new entity. : : Really? To me a "view" is definitely an "entity". You probably mean that : renaming should not create a new object. Yes. : But it is no matter, imposing a : constraint on an existing object does not change the object. It is merely a : precondition. Should renaming be for imposing constraints? If I rename myself as Bouwhouws, that won't change me I think, and it doesn't impose a constraint on me. That's renaming for me. It won't even change the sound of my name ;-) : for I in Constrained'Range loop : X2 (I) := 0; : end loop; : : may raise Constraint_Error or else corrupt memory if range checks are : suppressed. It is abolutely unacceptable. To put it in one sentence: either : you change bounds or you check them. But if you declare a subtype with constraints to be used in a renaming declaration, then you know the constraints. You also know the bounds of objects involved, by way of attributes. So you could make your intention more explicit by using these known quantities if you want to avoid copying. -- sb463ba