How does D improve design practices over C++?

Paul D. Anderson paul.d.removethis.anderson at comcast.andthis.net
Wed Oct 29 15:56:30 PDT 2008


bearophile Wrote:

> Walter Bright:
> > "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.
> 
> Yes, you are right, I have mixed two different things. They are almost orthogonal.
> The final purpose of a good language is to allow to write in a short enough time programs that give the correct output.
> But the things I was referring to are helpers to avoid putting bugs into the code, while SafeD is a way to not have really bad memory consequences if a certain class of errors are present anyway in the code :-)
> 
> Bye,
> bearophile

Since Boeing is a defense contractor many projects require safety in the "safe from accidentally doing something that could hurt somebody" sense. Some projects require a safety review (in the above sense) and an airworthiness review (in an obviously related sense). The current practice is an elaborate line-by-line, change-by-change review process, as well as an extensive test program.

I doubt that the DoD will ever do away with these reviews (nor do I think they should) but any help the programmers can get from the compiler to avoid unsafe programming "gotchas" has a potential for real cost savings -- finding the problem when it is cheap to fix, rather than in a costly review, revise, recheck loop at the end of the design effort. And Boeing likes cost savings.

This is why I'm trying to get D noticed here at Boeing. It's a very good fit for the things we do -- safe (memory safe and physically safe), efficient, powerful without being too complex, and a capable systems language. We still do a lot of bit-twiddling programming and need to be able to get to the hardware.

Paul

p.s. I'd forgotten about SafeD. Thanks for the reminder.




More information about the Digitalmars-d mailing list