On Mon, 28 Apr 2014 11:05:25 -0400, Byron <byron.he...@gmail.com> wrote:
On Mon, 28 Apr 2014 10:56:24 -0400, Steven Schveighoffer wrote:
Most definitely no. When the compiler builds b.d, he has no idea it's
imported from inside another namespace! We don't want #include-style
issues.
-Steve
So we would have to include the entire namespace in a single d file
or is this okay:
a/package.d
extern(C++, a) {}
public import a.b;
a/b.d
extern(C++, a.b) {}
Yes, that is fine.
You could also nest within the same file. But not via an import. In D,
it's important that imports are context-free, it doesn't matter where or
when you import them. This eliminates all sorts of problems that #include
has.
-Steve