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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM 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.66.72.73 with SMTP id b9mr1165130pav.9.1344850778540; Mon, 13 Aug 2012 02:39:38 -0700 (PDT) Path: g9ni53389124pbo.0!nntp.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news-in-01.newsfeed.easynews.com!easynews.com!easynews!novia!newsfeed.yul.equant.net!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!news-feed.eu.lambdanet.net!texta.sil.at!newsfeed.x-privat.org!news-out.readnews.com!transit4.readnews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Marius Amado-Alves Newsgroups: comp.lang.ada Subject: Re: Ada.Locales pseudo-string types Date: Wed, 8 Aug 2012 04:28:07 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <78707b6e-88a3-453a-a37c-840f7a62e703@googlegroups.com> <7303f906-0f6a-4d97-ae15-36b4056ede6c@googlegroups.com> <257b4f44-b6c6-4c79-8c6e-dec947a3ce25@googlegroups.com> <19aidilocj3ue$.ljphjv09js71.dlg@40tude.net> NNTP-Posting-Host: 188.80.87.103 Mime-Version: 1.0 X-Trace: posting.google.com 1344425289 7857 127.0.0.1 (8 Aug 2012 11:28:09 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 8 Aug 2012 11:28:09 +0000 (UTC) Cc: mailbox@dmitry-kazakov.de In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=188.80.87.103; posting-account=3cDqWgoAAAAZXc8D3pDqwa77IryJ2nnY User-Agent: G2/1.0 X-Received-Bytes: 3384 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-08-08T04:28:07-07:00 List-Id: > > But let me recall that the original case is all static: we want to convert from > > type Language_Code is array (1 .. 3) of Character range 'a' .. 'z'; > > to > > type String is array(Positive range <>) of Character > > with Pack; > > Nothing could go wrong in this case. > That depends on the way you define wrongness. An invalid value. > To me it is already wrong > because types are different. The whole point of the concept of conversion is precisely too bridge different types. Anyway, as you know, the language already converts between "different" arrays, as long as some aspects are equivalent. I am just suggesting changing the operand range = target range constraint, to <=. > Note that from my POV being structurally > equivalent means nothing. Type is a set of values and operations. What > operations are defined on Language_Code? Are they same to ones of String? > If so, then conversion is possible. Again, conversion is exactly to bridge these differences. If the operations were the same, we would not need to convert! > ... There really should be no types without > classes and primitive operations. I tend to agree here, but the above points stand.