So what exactly is coming with extended C++ support?

Meta via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 14 15:53:42 PDT 2014


On Tuesday, 14 October 2014 at 22:27:35 UTC, Walter Bright wrote:
> Currently, D supports C++:
>
> * function calling
> * name mangling
> * namespaces
> * templates
> * member functions
> * single inheritance
> * basic types that exist in C++ but not D (like 'long')
>
> Note that there are no plans to support C++ semantics - the D 
> side will support only D semantic rules. SFINAE, Koenig lookup, 
> etc., have no place in D.
>
> C++ interop will require the user to be flexible on both the 
> C++ and D side, and bluntly will require strong knowledge of D 
> and C++ and how they work under the hood to be successful with 
> it.
>
> Probably the most tricky thing we're working on is interop with 
> C++ exceptions.
>
> Essentially, we're going to see how far we can push interop.

To clarify, templates have to be instantiated on the C++ side 
before being passed to D, right? Is it correct that D can't 
instantiate a C++ template?


More information about the Digitalmars-d mailing list