I
Ian Collins
Preprocessor macros would be an unfortunate edge case, but IMHO
not a fatal one. For function-like macros, you can use the inline
keyword on a function to get namespaces. For constants, you could
use an enum.
What other corner cases can you think of?
Feeling C++-ey would be simple enough without any standard library
changes:
namespace std {
#include<stdio.h>
#include<stdlib.h>
}
And boom, you've got std::malloc() and std:uts() and all that.
Though now that I think about it, using that idea would probably
cause a fair bit of confusion for linkers.
Unless there was a standard for mangled names in C. Namespaces require
name mangling.