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: 103376,73cb216d191f0fef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.24.132 with SMTP id u4mr1500979wif.6.1363419697575; Sat, 16 Mar 2013 00:41:37 -0700 (PDT) Path: bp2ni95140wib.1!nntp.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Sat, 16 Mar 2013 08:41:27 +0100 Organization: cbb software GmbH Message-ID: <3p6p8k0yfly7.ctazdw7fc5so$.dlg@40tude.net> References: <8klywqh2pf$.1f949flc1xeia.dlg@40tude.net> <513f6e2f$0$6572$9b4e6d93@newsspool3.arcor-online.net> <513faaf7$0$6626$9b4e6d93@newsspool2.arcor-online.net> <51408e81$0$6577$9b4e6d93@newsspool3.arcor-online.net> <11rcs3gg4taww$.bylek8fsshyz$.dlg@40tude.net> <99929f93-b80f-47c3-8a37-c81002733754@googlegroups.com> <87ec4b1d-f7cd-49a4-8cff-d44aeb76a1ad@googlegroups.com> <78103a2f-5d19-4378-b211-1917175d5694@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: p+zKE0HPHYmgiZzsZLLeGQ.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: 2013-03-16T08:41:27+01:00 List-Id: On Fri, 15 Mar 2013 22:52:02 -0700 (PDT), Shark8 wrote: > True; but there could be some more interesting cases, say, for Ada 2020. > Something like: > > Abstract Type UNIVERSAL_STRING(Element : UNIVERSAL_CHARACTER) is > Array(Positive Range <>) of Element'Type; That would not work. I presume that here you want to create a root type for the class of string types and get at the members of the class (specific types like Wide_String) using a constraint. The problem is that string types must have different representations. The mechanism of constraining does not support. Thus either subtypes will have same representation or you won't have a class. Another problem is that string types must have more than one interface to deal with UTF-8 etc. An UTF-8 string is *both* an array of Wide_Wide_Character (= Unicode code points) and an array or sequence of Character (octets). An UTF-16 string is an array of Wide_Wide_Character and an array of Wide_String. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de