How does D improve design practices over C++?

Walter Bright newshound1 at digitalmars.com
Wed Oct 29 14:02:59 PDT 2008


bearophile wrote:
> D1 is often safer than C and C++, but regarding safety there are
> several things that can improved still, often with no/little
> performance penalty (unsafe casting (automatic and manual), integral
> overflows, GC pointers Vs other pointers, nonnull types, named
> arguments, fallthrough switch cases, multi var assigns syntax
> missing, octal literals, bitwise operators as symbols instead English
> words, and many other smaller things I have listed in the past). You
> may want to tell them about the idea of SafeD too (javesque D).

"Safety" in programming languages does not refer to program correctness, 
but absence of bugs that could result in memory corruption. The agenda 
of SafeD is to find the subset of D that can guarantee there is no 
memory corruption.

Null pointer dereferencing, for example, is a program bug but is not a 
safety issue because it cannot cause memory corruption.



More information about the Digitalmars-d mailing list