▲ | Voultapher 2 days ago | |||||||||||||||||||||||||||||||||||||||||||
> With program redesigns that Rust requires Why does Rust sometimes require program redesigns? Because these programs are flawed at some fundamental level. D lacks the most important and hardest kind of safety and that is reference safety - curiously C++ profiles also lacks any solution to that problem. A significant amount of production C++ code is riddled with UB and will never be made safe by repainting it and bounds checking. Claiming that not being forced to fix something fundamentally broken is an advantage when talking about safety doesn't make you look like a particularly serious advocate for the topic. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | WalterBright 2 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||
> 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. | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
▲ | wolvesechoes 2 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
> Why does Rust sometimes require program redesigns? Because these programs are flawed at some fundamental level. Simply not true, and this stance is one of the reasons we have people talking about Rust sect. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | akoboldfrying 2 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
> Because these programs are flawed at some fundamental level. No. Programs that pass borrow checking are a strict subset of programs that are correct with respect to memory allocation; an infinite number of correct programs do not pass it. The borrow checker is a good idea, but it's (necessarily) incomplete. Your claim is like saying that a program that uses any kind of dynamic memory allocation at all is fundamentally broken. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | drysine 2 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||
> Because these programs are flawed at some fundamental level. That's a very strong statement. How do you support it with arguments? | ||||||||||||||||||||||||||||||||||||||||||||
|