Re: Full proposal for the localized error message API
Lassi Kortela 26 Jul 2020 22:10 UTC
It's important to have a dedicated locale identifier for "unknown locale".
Eventually some API won't reliably specify which language it returns the
messages in. This is particularly the case if the messages come from a
network server. If someone installed a Ukrainian FTP server, how does an
American FTP library writer know that that particular server returns
errors in Ukrainian? This is a realistic scenario for any remote service
where the network protocol is not locale-aware.
Therefore many conscientious Schemers writing FFI bindings or protocol
implementations will want to return messages in unknown locale.
We also need a value to indicate the "default" or "first" locale.
#f is a natural choice for both "unknown" and "default". How to solve
this conundrum?
If a message is supplied in unknown locale, will that message always be
the "default" or "first" locale as well?