Quote:
What's good with classes? How about they can easily manage an internal state without littering around globals, how they can overload operators and can easily take care of their own resource management via constructors, copy constructors and destructors? The compiler will call them automatically for us, instead of we having to remember to call cleanup functions.
Namespaces do not contribute to that very much, I'm afraid, so without classes, it's like it's back to the good old C days.
Classes versus namespaces is not a zero sum game. That classes can provide functionality that namespaces cannot do not point to a deficiency in namespaces, but to the fact that they have different use cases. I am not saying: prefer namespaces to classes. I am saying: use namespaces and classes (and free functions) appropriately.