3 ms·
In addition to what other commenters have said, I'll add that D has good portability. It's able to target operating systems and architectures outside the curren
by Seirdy 5y ago
In addition to what other commenters have said, I'll add that D has good portability. It's able to target operating systems and architectures outside the current mainstream.
IMO, its niche is similar to Go and Nim.
- gavinray 5y agoYeah, I cross-compiled from Linux to Windows with LDC and it was literally adding one line to config and using "-triple x86_64-windows-msvc" Pretty mindblowing. Also the dependency management and build system doesn't suck.
- qorrect 5y agoThat is pretty mind-blowing, awesome work there.
- Seirdy 5y agoOther entries in the recent wave of "compiled high-level" languages also neglect support for operating systems outside the mainstream Linux, macOS, and Windows or ARMv8 and x86_64; D supports a variety of operating systems and targets thanks to its alternative compilers: => https://wiki.dlang.org/Compilers https://wiki.dlang.org/Compilers C and Go also fare well in this regard; D sort of fills a niche between them.
- WalterBright 5y agoOne thing that makes porting D code easy is byte, short, int and long have the same size across all platforms. It's unbelievable how much time is wasted in C/C++ programming accounting for int not being a reliable size. I know one can use stdint.h, but people still just use `long` and then the code breaks when ported between OSX and Linux. Another simple but convenient feature is, what if you need the maximum size of an int? #include <limits.h> int max = INT_MAX; But what about: typedef int myint; myint mymax = MYINT_MAX; // oops D has properties, here a .max property: int max = int.max; typedef int myint; myint mymax = myint.max; Nice things like this eliminate a lot of porting bugs.