Adding D code to a C++ codebase

Joakim via Digitalmars-d digitalmars-d at puremagic.com
Sat May 6 06:42:41 PDT 2017


On Saturday, 6 May 2017 at 11:44:28 UTC, Russel Winder wrote:
> Say I have a C++14 codebase, for arguments sake let's call it 
> Me TV. Say I fancy rewriting it in D, but incrementally not as 
> a "big bang". Actually I may start by adding new features in D 
> code rather than C++. In any event it is a mixed C++/D code 
> with a C++ main.
>
> The build is currently CMake (because of CLion) and Meson 
> (because it's
> a Gtk+3 application).
>
> Can anyone point me at anyone successfully doing mixed C++/D 
> codebases with those build systems?


ldc is a mixed D/C++ codebase using CMake:

https://github.com/ldc-developers/ldc/blob/master/CMakeLists.txt

> That I will try this conversion is not yet certain. Why? 
> Tooling. C++ is very well supported by tools and IDEs, D is not.
>
> CLion, IntelliJ IDEA, Eclipse/CDT, Xcode, and Visual Studio 
> seem to be the IDEs of the moment. There is effort to get D 
> support in IntelliJ IDEA, but CLion is where the C++ folk are. 
> Eclipse/CDT appears to have lost all activity on the D support. 
> I'm on Linux so Visual Studio is not an possibility.

VS Code?

> (Emacs, Vim, etc. really do not cut it for me any more, Since 
> using
> PyCharm, IntelliJ IDEA and CLion for Python, Kotlin, Groovy, 
> Java, C++
> – it is left as an exercise for the reader to match language to 
> IDE – I
> cannot imagine not using a good IDE for programming.)
>
> I guess I am leading up to: I wonder how many people look at D 
> and walk away because the tooling is not up to that of C++ and 
> Python?

I use Vim, I wouldn't know.


More information about the Digitalmars-d mailing list