On 4/2/2014 3:33 PM, bearophile wrote:
I suggest to brainstorm the syntax some more time, because someone could be able
to invent a better syntax.

Some seeds:

extern (C++(nspace)) {
     int foo();
}

I considered that, but it fails because:

C++:

    namespace S { namespace T {
        int foo();
        namespace U {
            int foo();
        }
     } }

D:

  extern (C++, S.T) {
      int foo();
      extern (C++, U) {
        int foo();
      }
  }
  foo();  // error, ambiguous, which one?
  S.T.foo(); // S undefined


> extern (C++) struct nspace {
>      int foo();
> }

Fails because a struct as struct and struct as namespace are not 
distinguishable.

Reply via email to