Open ramon-bernardo opened 2 months ago
@ranisalt to what extent is it good to use namespace to handle all singletons? I personally like namespaces, but is it in its main function? Anyway, I can't think of any other idea.
to what extent is it good to use namespace to handle all singletons?
Singletons are ~almost~ always a bad idea. Namespaces are an enhanced private
section in a class, since you hide the implementation details and the compiler can assume it's not visible and perform more aggressive optimizations.
I like this post on how singletons are an awful idea in general. Namespaces don't solve it, but they make it less bad.
Pull Request Prelude
Changes Proposed