As of February 2012, it seems that the LDC is not really a useful option (at least on Debian).
For example, consider the first program in book D :
import std.stdio; void main(string[] args) { writeln("Hello, world!"); }
This does not compile with LDC on my system:
hello.d(24): Error: module stdio cannot read file 'std/stdio.d'
The same applies to the first program on dlang.org :
import std.stdio; void main() { ulong lines = 0; double sumLength = 0; foreach (line; stdin.byLine()) { ++lines; sumLength += line.length; } writeln("Average line length: ", lines ? sumLength / lines : 0); }
This is because my LDC does not support Phobos - the current D time library . It seems like you can create a version of LDC, including Phobos, but that's not how it ships to Debian at least.
GDC, and, of course, DMD, how to compile above is excellent. It seems that the GDC is pretty up-to-date (DMD was released 2.057 two months ago, and GDC is supporting it now).
For me, the GDC was an obvious choice, because the simple " apt-get -V install gdc " brought both the compiler and the runtime Phobos without problems (tested on Debian unstable).
Justin Feb 25 2018-12-12T00: 00Z
source share