On 3/25/2012 10:31 AM, bearophile wrote:
One more disadvantage of not using D (or a language safer than C/C++) to
implement a safe language as D is that the compiler will have many more bugs,
so while you program in the implemented language (D) you will find many D
compiler bugs. Today I think that it's very hard to create a reliable
language writing its compiler in a not reliable language.

Oh, rubbish. Vanishingly few of the reported DMD compiler bugs would have been caught by using a safe(r) language.

The bugs have been logic errors, usually due to making improvements in the D language and failing to account for all of the effects of those improvements in the compiler.

So why hasn't dmd been subject to all sorts of safety errors (like buffer overruns, uninitialized pointers, etc.)?

It's because I've been writing C/C++ code for 30 years now. For the first 10 years, my code suffered a lot from those sort of bugs. Over time, the code had less and less of them. I simply learned to avoid them. It's like playing the guitar - do it enough and you eventually learn to avoid all the more basic mistakes.

Don't take this as an argument that we don't need safe(r) languages. We do. I don't see a reason for programmers to spend 10 years suffering in the wilderness to learn to avoid making certain kinds of mistakes.

Reply via email to