▲ | WalterBright 2 days ago | ||||||||||||||||||||||||||||||||||
> Why does Rust sometimes require program redesigns? Because these programs are flawed at some fundamental level. I'm familiar with borrow checkers, as I wrote one for D. Not following the rules of the borrow checker does not mean the program is flawed or incorrect. It just means the borrow checker is unable to prove it correct. > D lacks the most important and hardest kind of safety and that is reference safety I look at compilations of programming safety errors in shipped code now and then. Far and away the #1 bug is out-of-bounds array access. D has solved that problem. BTW, if you use the optional GC in D, the program will be memory safe. No borrow checker needed. | |||||||||||||||||||||||||||||||||||
▲ | Voultapher 2 days ago | parent [-] | ||||||||||||||||||||||||||||||||||
> I look at compilations of programming safety errors in shipped code now and then. Far and away the #1 bug is out-of-bounds array access. D has solved that problem. Do you have good data on that? Looking at the curl and Chromium reports they show that use-after-free is their most recurring and problematic issue. I'm sure you are aware, but I want to mention this here for other readers. Reference safety extends to things like iterators and slices in C++. > Not following the rules of the borrow checker does not mean the program is flawed or incorrect. At a scale of 100k+ LoC every single measured program has been shown to be flawed because of it. | |||||||||||||||||||||||||||||||||||
|