Namespaces'n Libraries

Hello,

I was wondering about something again, as I often do. I find that a lot of libraries that C++ can import (Xorg, DirectX, WinApi, etc) do not contain the methods and classes of those libraries in namespaces. For instance, why not: d3d::calculateNormals(...)? It seems to me that this would be beneficial to organization and would prevent conflicting names and classes. Are there drawbacks that I am not seeing?

Thank You,
MaxterTheTurtle
Libraries like wxWidgets use the prefix wx for their types and functions. Libraries like SFML, use one namespace sf.
I think using one namespace is the best.

Aceix.
IMO, that's pure short-sightedness or laziness on the part of the developer of the library. i.e. Let evreybody else use namespaces to avoid conflicts.

Some libraries try to avoid naming conflicts by prefixing all calls, classes, etc with a unique prefix. This is more suited to C libraries which don't support namespaces.
Topic archived. No new replies allowed.