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!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Strings with discriminated records Date: Tue, 29 May 2018 12:14:26 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <55ce14eb-6b83-4ea0-a550-f9e1410d0b06@googlegroups.com> <51dfb377-1b3e-45ca-a211-158101efe557@googlegroups.com> <090d6eb2-9f52-4471-a22e-ce1bdf457188@googlegroups.com> <90f0f8da-dadd-4341-bc0f-dbda94b0516c@googlegroups.com> <137bcc76-2489-4557-979b-5efeecbd9289@googlegroups.com> <209e0a3c-5473-4219-8954-43bd9602442c@googlegroups.com> NNTP-Posting-Host: MyFhHs417jM9AgzRpXn7yg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 X-Notice: Filtered by postfilter v. 0.8.3 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:52760 Date: 2018-05-29T12:14:26+02:00 List-Id: On 2018-05-29 11:31 AM, AdaMagica wrote: > Am Dienstag, 29. Mai 2018 09:49:20 UTC+2 schrieb Dmitry A. Kazakov: >> Yes. Renaming temporary objects is probably a language design bug. > > It was a consequence of making function results to objects. Before, they were mere values. > Objects can be renamed. Yes, but renaming objects without names is obviously charged with potential problems. It is best to leave anonymous objects alone for optimization reasons. >> renaming is broken in so many ways that one more, one less does not make >> much difference. > > Hm, I only see one lie with renaming: > > X: constant Integer := -1; > Y: Positive renames X; > > What are the other broken features? 1. Not sliding array indices even if explicitly required/implied/expected. (This is possibly a similar problem to with Integer/Positive that constraints are not respected/checked/enforced/rejected.) 2. Renaming can hide/conflict with the original object and its renamings. This should never happen. 3. There should be no subtype specification in renaming at all. Renaming must deal with names only. (I understand the motivation behind. I.e. to be able to rename overloaded subprograms. But that is a false place to solve an unrelated problem: lack unambiguous naming for subprograms) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de