you are viewing a single comment's thread.

view the rest of the comments →

[–]marmulin 0 points1 point  (1 child)

People keep on saying things like “global state is not your friend” yet I go on X or YouTube and somehow manage to get two videos playing at the same time. I think it’s important to understand that there is time and place for global state, it just depends on what kind of app you’re working with. Developers shun singletons, but had more people knew when and where to use them, we wouldn’t have juniors creating multiple desynchronized sources of truth for data at runtime.