Unclear about the benefits of D over C++ and Java
Ola Fosheim Grøstad via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jan 2 03:51:54 PST 2016
On Saturday, 2 January 2016 at 11:31:24 UTC, Dibyendu Majumdar
wrote:
> I feel that for someone like me it is not clear what
> significant advantages D has over C++ or Java to make a switch.
> I cannot afford to experiment with a language unless I know for
> certain the benefits of using it.
If you are truly proficient in C++ then you probably are better
off with C++ at this point than using languages like D, Rust or
Swift, at least for long term commercial projects.
> * Do D compilers generate more efficient code compared to C++
> compilers?
No. The best D compilers use backends written for C/C++
(llvm/gcc).
> * Can D generics do everything C++ templates can (are they
> Turing complete for instance) - and what additional
> capabilities does D have that would make a significant
> difference to the way templates are used in C++?
Certain things are more tedious in C++, like adding methods based
on template parameters. Compile time reflection is also more
tedious in C++.
Yet again, certain other things look syntactically better in C++
and other things look better syntactically in D.
> * How does D's performance compare with Java when it comes to
> concurrent applications or garbage collection?
Java has much better garbage collectors. Concurrency frameworks
have been more thoroughly tested in Java and C++.
> * How stable is D? Can one use it without fear that the next
> version will significantly change the language and therefore
> one would have to rewrite?
Java and C++ are more mature and have been more stable.
More information about the Digitalmars-d
mailing list