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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: G. B. Newsgroups: comp.lang.ada Subject: Re: gettext for Ada Date: Thu, 23 Nov 2017 18:55:44 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <2c5d0dff-bc12-4b37-b8e1-ac176c3e675f@googlegroups.com> <40dc6a79-9434-4b5a-bed0-50ee1dfb74c5@googlegroups.com> <6b0dde52-4f23-451a-ae8f-9199299c3a0a@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 23 Nov 2017 18:55:44 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="7b0e2b61cea53eb5efd303dcfb920012"; logging-data="13471"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6Q+0yH7qvlbIal6w5oqSMs2YUsTfVZXk=" User-Agent: NewsTap/5.2.6 (iPhone/iPod Touch) Cancel-Lock: sha1:u+zAVBaAz0HWTu7wC1iZdELM+aU= sha1:mjV1WoC1KdLwLa1ds3KexJN8u1E= Xref: feeder.eternal-september.org comp.lang.ada:49119 Date: 2017-11-23T18:55:44+00:00 List-Id: Shark8 wrote: >> The set of locales may grow. ‘Last etc. would change. > > Why would you use 'Last or 'Succ on languages? No type can be exempt from general Ada semantics. That’s like asking why I would use 13 for Ada in the USA? > Using enumerations also means that you can leverage discriminated > records, making a solid foundation for true multilingual applications: > It might be realistic to assume a set of languages that a program supports. The set might or might not be a proper subtype. In any case, I’d define a type that enumerates the supported languages and “link” it to locales. The type thus provides decoupling in place of dependence on an ever changing library type.