Hello, do you use singleton in your projects??


I dislike simpletons (and globals in general), but that’s because I love to leave my projects as open-ended as possible.

Most projects I’ve worked on that were not started and/or I was not the primary worker on tend to use them for anything that could be made global, but shouldn’t be constructed before main().

I think it should be avoided, but sometimes it’s just impractical not to make something a singleton/global. If you’re in C++, definitely make it a singleton over a global! g++ doesn’t like globals in the first place, and you should avoid calling constructors before main().