On 4/3/14, 4:19 AM, Daniel Murphy wrote:
"Walter Bright" wrote in message news:lhi1lt$269h$1...@digitalmars.com...
Here's Andrei's proposal:
extern (C++) template nspace() {
int foo();
}
This is really ugly and complicated.
Why not just
pragma(cpp_namespace, "outer")
{
pragma(cpp_namespace, "inner")
{
extern(C++) void func();
}
}
which is trivial to implement and doesn't require parser or semantic
changes?
I don't quite see how one is ugly and complicated and the other is...
pretty and simple? Anyhow de gustibus.
Adding syntax for actual namespaces to D is a different beast and IMO
not worthwhile.
Agreed.
Andrei