On Fri, Jul 31, 2020 at 1:55 AM Lassi Kortela <xxxxxx@lassi.io> wrote:
> Or multiple first-class types:
>
>    (locale (lang 'sr) (script 'Latn) (region 'MN) (variant 1349))
>
> You'd want predefined instances of the languages/scripts/regions/variants,
> and/or interning to assure (eq? (lang 'sr) (lang 'sr)).  This allows some
> optimizations with storing information (e.g. date/time and currency prefs)
> directly in these objects instead of requiring extra lookup tables.
>
> You'd then want utilities:
>
>    (bcp-47-tag->locale <str>)
>    (current-system-locale)

Just noticed that SRFI 29 (Localization) exists.
<https://srfi.schemers.org/srfi-29/srfi-29.html>:

current-language -- Current ISO 639-1 language code as a symbol.

current-country -- Current ISO 3166-1 country code as a symbol.

current-locale-details -- Additional locale details as a list of
symbols.  This list may contain information about encodings or other
more specific information.

Yes, but this doesn't address the problem with (possibly 0-prefixed)
numbers we're discussing.

--
Alex