4 ms·
Everything related to safety is on my list. (the list is big) I think big problems can be broken down into smaller ones.
by thradams 3y ago
Everything related to safety is on my list. (the list is big)
I think big problems can be broken down into smaller ones.
- pizlonator 3y agoI don't think it's very compelling to convert C code to a thing that gives you a safety half-measure. You'll still have security bugs, so it'll just feel like theatre.
- uecker 3y agohuh? There are also security bugs in Rust, so it is theatre as well? Pointer ownership could eliminate a class of bugs. And such an approach can be combined with run-time checks for bounds and signed overflow, and then you have a memory-safe C more or less (some minor pieces are still missing, but nothing essential),
- pizlonator 3y agoMemory safety is what we should be aiming for. I don't personally like Rust, I believe Rust achieves this. In Rust, if you don't use the unsafe escape hatch, then your bugs are at worst logic bugs. There won't be any kind of weirdness like that you got some math wrong in an array access and now all of a sudden an attacker can make your program execute arbitrary code. On the other hand, this Cake thing just adds some ownership and when folks say it's problemmatic the first answer is "oh just tell it to ignore your function". That doesn't sound like memory safety to me. It's nowhere near Rust in that regard.
- saagarjha 3y agoRust does the same thing, though? If you are having trouble pleasing the compiler, you can use unsafe to get around it. Of course, the Rust people are a lot more active at telling you that what you wanted was actually wrong and bad, but it's essentially the same position.
- pizlonator 3y agoNo, it's not the same position, because you can write a lot of Rust code without ever using unsafe.
- hgs3 3y agoCode that's full of memory bugs is likely full of other bugs too. Improving testing methodology, perhaps establishing official guidelines, would address ownership issues and more. The goal should be to write robust software, because robustness implies memory safety but the reverse is not true.