News for hackers. Stuff that matters.
Re:Singleton Is a Bad Idea by TheOtherHobbes on Sunday April 10, 2022 @03:14PM (#30980637)
Although it can be hacky to implement in Python, a singleton object can enforce locking and privilege-based access control. It can also group globals into sub-objects, which can make some naming systems easier to enforce/remember.

Open globals are unstructured, and more likely to turn into a messy free for all.

There are no comments on this comment yet.