Re:Why Class?
by nostrademons on Sunday November 24, 2013 @11:06PM
(#6792424)
Singletons can be made thread-safe (with difficulty), and you can use complex lazy singletons in C++ code while complex globals gets you into trouble with module initialization order. So there're some very pragmatic reasons to use singletons over globals, even if the same drawbacks apply to both.
[ Parent
| on HN ]
There are no comments on this comment yet.