DIP61: redone to do extern(C++,N) syntax
Byron via Digitalmars-d
digitalmars-d at puremagic.com
Mon Apr 28 07:50:09 PDT 2014
On Mon, 28 Apr 2014 10:45:14 -0400, Steven Schveighoffer wrote:
> On Mon, 28 Apr 2014 10:37:36 -0400, Byron <byron.heads at gmail.com> wrote:
>
>
>> why not import _cpp = bar; ?
>
> That doesn't help. foo.func() is still ambiguous. With this proposal,
> you have hijacked the meaning of namespace lookup. When I say x.y.z, it
> doesn't just mean look for symbol z in module x/y.d, it can also mean to
> look for symbol z in C++ namespace x::y. This was not the case with C
> binding, which continued to use D modules for symbol lookup.
>
> Consider that a boatload of C++ code is named std::something. Now,
> std.string has an ambiguous meaning wherever it is used!
>
> -Steve
bar is renamed, thus you have to access via _cpp.[namespace]
renames were added to prevent hijacking.
More information about the Digitalmars-d
mailing list