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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,2e6723b897ab47fb X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.88.195 with SMTP id bi3mr1203739wib.3.1344851360258; Mon, 13 Aug 2012 02:49:20 -0700 (PDT) Path: q11ni107278614wiw.1!nntp.google.com!feed-C.news.volia.net!volia.net!news2.volia.net!feed-A.news.volia.net!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!news-feed.eu.lambdanet.net!texta.sil.at!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada.Locales pseudo-string types Date: Wed, 8 Aug 2012 13:59:55 +0200 Organization: cbb software GmbH Message-ID: <8zenu4qplfb$.1uc9oi1819c3v$.dlg@40tude.net> References: <78707b6e-88a3-453a-a37c-840f7a62e703@googlegroups.com> <7303f906-0f6a-4d97-ae15-36b4056ede6c@googlegroups.com> <257b4f44-b6c6-4c79-8c6e-dec947a3ce25@googlegroups.com> <1o3by92cb82px$.1gavjw6p23du6$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-08-08T13:59:55+02:00 List-Id: On Wed, 08 Aug 2012 14:14:26 +0300, Niklas Holsti wrote: > On 12-08-08 11:09 , Dmitry A. Kazakov wrote: >> On Wed, 08 Aug 2012 10:37:51 +0300, Niklas Holsti wrote: >> >>> On 12-08-08 10:18 , Dmitry A. Kazakov wrote: >>>> On Wed, 08 Aug 2012 10:04:37 +0300, Niklas Holsti wrote: >>>> >>>>> The rule does seem surprisingly rigid, for a value conversion. (The >>>>> Annotated RM does not explain or motivate it.) >>>> >>>> Ada didn't appreciate structured type equivalence in earlier times. These >>>> rules were designed before anonymous access types crept in. >>> >>> But we are talking about explicitly requested type conversions, not >>> implicit type equivalence. As I understood it, at least. >> >> Yes, but the validity of this conversion relies on an inferred equivalence >> of the [sub]types of the elements. > > No, I would rather think that the explicitly requested array-type > conversion implies requests to convert the index [sub]types and the > element [sub]types, too. Yes, but the way this conversion is constructed is based on the assumption that subtypes of the element are equivalent up to a conversion. BTW, if you go that far you should also allow conversions between any array types of convertible elements. E.g. between arrays of floats and arrays of integers etc. >> Ada considered them equivalent nominally. > > Yes, but in order to be sure that the conversion requires no active > machine code and can be done just by relabeling the type of a reference > to the array. This is one possible point of view, which is pretty weak. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de