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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.146.4 with SMTP id u4mr15516315iod.101.1511468673621; Thu, 23 Nov 2017 12:24:33 -0800 (PST) X-Received: by 10.157.42.99 with SMTP id t90mr1099849ota.5.1511468673522; Thu, 23 Nov 2017 12:24:33 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.kjsl.com!usenet.stanford.edu!d140no4749129itd.0!news-out.google.com!193ni8673iti.0!nntp.google.com!d140no4749122itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 23 Nov 2017 12:24:33 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.113.16.86; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 76.113.16.86 References: <2c5d0dff-bc12-4b37-b8e1-ac176c3e675f@googlegroups.com> <40dc6a79-9434-4b5a-bed0-50ee1dfb74c5@googlegroups.com> <6b0dde52-4f23-451a-ae8f-9199299c3a0a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: gettext for Ada From: Shark8 Injection-Date: Thu, 23 Nov 2017 20:24:33 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: feeder.eternal-september.org comp.lang.ada:49121 Date: 2017-11-23T12:24:33-08:00 List-Id: On Thursday, November 23, 2017 at 11:55:46 AM UTC-7, G. B. wrote: > Shark8 wrote: >=20 > >> The set of locales may grow. =E2=80=98Last etc. would change. > >=20 > > Why would you use 'Last or 'Succ on languages?=20 >=20 > No type can be exempt from general Ada semantics. > That=E2=80=99s like asking why I would use 13 for Ada in the USA? I'm not saying the type should be exempt from the general semantics; I'm sa= ying that the operations don't make sense in the context of language... and= that fact could be put into the standard with something like: "The order and position of the Language and Locale types should not be reli= ed upon, particularly since the referenced standards may be updated and Pac= kage Ada.Locales may be updated at any time to reflect the current state of= those standards; therefore, usage of 'First, 'Last, 'Succ, 'Pred, 'Val, an= d 'Pos are discouraged." Getting the proper value when the OS (or some non-Ada library) returns a st= ring could be done via the 'Value attribute; e.g.: Function Get_Language return Language is Function OS_Get_Language return C_String with Import, Convention =3D> C, Link_Name =3D> "getlang"; Begin Return Language'Value( To_Ada_String( OS_Get_Language ) ); Exception When Constraint_Error =3D> Return und; End Get Language;