3 ms·
D competes more with GC languages like Go and Modula 3, rather than the C / C++ / Rust GCless niche.
by fanf2 6y ago
D competes more with GC languages like Go and Modula 3, rather than the C / C++ / Rust GCless niche.
- optymizer 6y agoI invite you to use D's -betterC compiler option and evaluate it in the context of C/C++/Rust.
- fanf2 6y agoAs I understand it, that means you can't benefit from most of the D standard library and ecosystem
- optymizer 6y agoYou can use packages that have been converted to not use the GC and all of the libraries you would be using in C or C++. You still get the following language features, which is more than what C, C++ or Rust have to offer (though Rust is hot on D's trail). Unrestricted use of compile-time features Full metaprogramming facilities Nested functions, nested structs, delegates and lambdas Member functions, constructors, destructors, operating overloading, etc. The full module system Array slicing, and array bounds checking RAII (yes, it can work without exceptions) scope(exit) Memory safety protections Interfacing with C++ COM classes and C++ classes assert failures are directed to the C runtime library switch with strings final switch unittest printf format validation https://dlang.org/spec/betterc.html https://dlang.org/spec/betterc.html
- tastyminerals2 6y agoThis is the first time I see such a comparison :) D is a systems programming language with an optional GC and in the league with C/C++/Rust. I would add Nim and Zig here as well.
- fanf2 6y agoNim is in the GC category (and its documentation says you should use a refcounting GC rather than turning it off). Zig does not use GC. Memory management is one of the more important aspects of systems programming so it is useful to be clear about what is the main strategy used by each language.