DIP61: Add namespaces to D

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 26 12:56:34 PDT 2014


On 4/26/14, 2:31 AM, Walter Bright wrote:
> http://wiki.dlang.org/DIP61
>
> Best practices in C++ code increasingly means putting functions and
> declarations in namespaces. Currently, there is no support in D to call
> C++ functions in namespaces. The primary issue is that the name mangling
> doesn't match. Need a simple and straightforward method of indicating
> namespaces.
>
> There have been many proposals earlier:
>
>    http://forum.dlang.org/post/lhi1lt$269h$1@digitalmars.com
>
> but it seems to me that the simplest, most straightforward approach
> would be better.
>
> As more and more people are attempting to call C++ libraries from D,
> this is getting to be a more and more important issue.

I'm anchoring a response to this although it refers to the ensuing 
conversation.

I think this is not a good proposal from a "proportional response" 
standpoint: it squanders a keyword for a minor feature.

I also think the preexisting suggestions are each wanting in various ways.

That's why we should guide the discussion not in the direction of 
ranking existing proposals, but instead to acknowledge we have a 
collection of bad proposals on the table and we need to define a better one.


Andrei


More information about the Digitalmars-d mailing list