D vs Rust
Xinok via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jan 31 10:32:12 PST 2016
On Sunday, 31 January 2016 at 16:30:47 UTC, Ola Fosheim Grøstad
wrote:
> On Sunday, 31 January 2016 at 16:18:21 UTC, bearophile wrote:
>> Regarding the code reliability, D is better than C++11
>
> That's a bold claim. What do you mean by "code reliability"?
> You get as strong typing as you want with C++.
>
> (And no, Laeeth, the fact that Manu has a nice boss that allows
> him to use an unfinished product in production is not a good
> reason for other people to do so. Try to be reasonable, just
> try...)
He likely means that, in general, D code has fewer bugs than
C++11 code. There are numerous reasons for this but I'll just
give a few examples:
* Certain types of implicit casts are not allowed in D where the
original value may be lost, e.g. int to short.
* Functions MUST return a value in D or at least throw an error.
* D has far less "undefined behavior" than C++.
* safe, pure, transitive const/immutable, thread-local by
default, etc.
This and much more makes D far more "reliable" than C++.
More information about the Digitalmars-d
mailing list