3 ms·
Locales in C are an example of this. https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f027338b0fab0f5078971fbe https://github.com/mpv-player/mpv/commit
by matheusmoreira 7y ago
Locales in C are an example of this.
https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f027338b0fab0f5078971fbe https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f02...
> The locale (via setlocale()) is global state, and global state is not a reasonable way to do anything.
> It will break libraries, or well modularized code.
> (The latter would be forced to strictly guard all entrypoints set set/restore locales, assuming a single threaded world.)
> On top of that, setting a locale randomly changes the semantics of a bunch of standard functions.
> If a function respects locale, you suddenly can't rely on it to behave the same on all systems.