/d-cpptest

Trying to make D and C++ cooperate

Primary LanguageC++

C++ Test

Exploring a how well D can interact with C++. D has more potential than Rust.

Walter Bright says that exceptions are still a problem though. LDC 1.7.0 release says "C++ exceptions can now be caught in D code".

Basic idea of the example: The program reads lines from stdin and does things with it. There is an observer class declared in C++. Can we also register a D class? Yes, we can.

Limitations

Using the STL does not really work. The problem is that we must replicate the complete header files in D. This is a lot of work and not portable between different compilers.

There is the Calypso project, which tries to automate that by using Clang to parse the headers.