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.0 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48, 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.66.77.101 with SMTP id r5mr2733747paw.27.1344480220778; Wed, 08 Aug 2012 19:43:40 -0700 (PDT) Path: g9ni18106322pbo.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada.Locales pseudo-string types Date: Tue, 7 Aug 2012 09:20:27 +0200 Organization: cbb software GmbH Message-ID: <1c0bzt3sc5or4$.1paj80kt0sjb1$.dlg@40tude.net> References: <78707b6e-88a3-453a-a37c-840f7a62e703@googlegroups.com> <7303f906-0f6a-4d97-ae15-36b4056ede6c@googlegroups.com> 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-07T09:20:27+02:00 List-Id: On Mon, 6 Aug 2012 16:07:02 -0700 (PDT), Adam Beneschan wrote: > I just sent a note to Ada-Comment requesting that To_String and > From_String operations be added to Ada.Locales. Maybe that isn't the > right solution, but it does seem like something needs to change. Yes, the right one would be an array subtype which is presently impossible to have. E.g. subtype Language_Code is String (1 .. 3) of Character range 'a' .. 'z'; A similar case where array elements need to be constrained is an array of class-wide elements as a replacement to generics: type Container is array (Positive range <>) of T'Class; -- No objects allowed type S is new T with ...; subtype Container_Of_S is Container of S; Syntax is imaginary. Maybe, aspects could help better express element constraints. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de