On 2014-04-03 19:43:23 +0000, Walter Bright <[email protected]> said:

On 4/3/2014 3:36 AM, Michel Fortin wrote:
I'd tend to simply implement extern(C++, namespace.here), which should work fine to wrap single-namespace cpp files, and wait to see what are the actual friction
points before introducing more (people can experiment with structs or other
modules meanwhile).

You have a good point in that to go all the way with namespaces, we'd have to implement Koenig lookup and support insertion of names into previous namespaces.

I can't see this happening in D.

Me neither.

But I don't see that as much of an argument to not do simple scoping with namespace lookup.

What I'm saying is that it should be optional to create a new scope to declare a C++ function from a namespace. In other words you need to be able to put the function at module scope in D.

--
Michel Fortin
[email protected]
http://michelf.ca

Reply via email to