3 ms·
That it's not necessary to put everything into one namespace is also demonstrable. In terms of C compatibility, C++ still has different namspaces for goto labe
by kazinator 5y ago
That it's not necessary to put everything into one namespace is also demonstrable.
In terms of C compatibility, C++ still has different namspaces for goto labels, macros and structure members.
In C++, every class scope is a namespace (whereby if there is an ambiguity or clash, we can use the class name together with the scope resolution operator to qualify a name). If that's not enough, there is the namespace keyword.
All programming factions agonize over something. C programmers agonize over, do I always have to make macros in ALL CAPS or not? Should the leftmost argument always be the destination? Intrusive container, or void * pointer to data? uint32_t here, or just int will do?
- ncmncm 5y agoMy observation was not about namespaces, it was about decision-making practices in language design. The more successful languages have focused on practical consequences of choices.