Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Dependency injection is dynamic scoping in disguise. Parent comment
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.
There are no comments on this comment yet.
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.