3 ms·
There are 3 major compiler implementations (dmd, gdc, ldc). I mostly work with gdc from GNU/Linux, and basically, everything that works with g++ works with gdc
by Ace17 10y ago
There are 3 major compiler implementations (dmd, gdc, ldc).
I mostly work with gdc from GNU/Linux, and basically, everything that works with g++ works with gdc.
More precisely, I use, on a daily basis:
- vim + ctags (editor + symbol lookup)
- gdb (debugger)
- gcov (code coverage)
- valgrind (mostly callgrind (call-graph) and massif (memory profiler))
- oprofile (cpu profiler)
Unfortunately there's no ccache equivalent yet, and I'm missing it.
For the Windows people, there's VisualD, which basically is the integration in Visual Studio. At this point, you have an IDE and a debugger (I don't know about code completion).
There's also a build-tool (with package-managing abilities), called "dub" ; that handles fetching and building external dependencies (in the vein of npm).
- int_19h 10y agoI'll need to check out VisualD. Someone should do a Language Server Protocol (http://langserver.org/ http://langserver.org/) implementation for D - that's clearly the way forward. Right now this will give you VSCode, Eclipse and NeoVim, with regular Vim and Emacs on the way. VSCode also has something similar for debugging (https://code.visualstudio.com/docs/extensionAPI/api-debugging https://code.visualstudio.com/docs/extensionAPI/api-debuggin...), but it hasn't been standardized in a similar fashion (yet?).
- p0nce 10y agoI use the debugger in VisualD on Windows and LDC on macOS. I guess you can also use the one in Visual Studio Code. There is ongoing work with the LSP actually, since the VSC integration uses something similar already.
- int_19h 10y agoBTW, I tried VisualD, and it seems that its code completion support is rudimentary. I could get it to complete functions sometimes, and I couldn't get it to complete members at all. Obviously, no refactoring either. It's unfortunate, but that would be a blocker for me.
- int_19h 10y agoOh, what's the language feature parity between compilers? Are things as bad as in C++ land in that regard, or is everything reasonably close, without portability headaches when moving code between compilers?
- p0nce 10y agoLDC and DMD are basically at the same frontend, so it is rare to do a `version(LDC)`. GDC is a bit behind atm, but the language and library is really stable. Usually you don't change anything at all between compilers and OS. Most notable exceptions is the SIMD capabilities, and inline assembly is different on GDC. The stdlib covers a lot of ground so portability across OSes is much easier than in you-know-which-language, so small tools tend to blossom.