4 ms·
> but near-impossible to write incorrect code. Except most bugs are about unforeseen states (solved by limiting code paths and states) or a disconnect between
by grandempire 2y ago
> but near-impossible to write incorrect code.
Except most bugs are about unforeseen states (solved by limiting code paths and states) or a disconnect between the real world and the program.
So it’s very possible to write incorrect code in rust…
- deleted 2y ago[deleted]
- netbioserror 2y agoTrue, but I think errors in real-world modeling logic are part of our primary problem domain, while managing memory and resources are a secondary domain that obfuscates the primary one. Tools such as exceptions and contract programming go a long way towards handling the issues we run into while modeling our domains.
- grandempire 2y agoIndeed, but you said something more extreme in the first comment.
- jayd16 2y agoThey should have said safe/unsafe. Correct implies it also hits the business need, among other baggage.
- kstrauser 2y ago> Except most bugs are about unforeseen states Study after study shows that's not true, unless you include buffer overflows and the various "reading and writing memory I didn't mean to because this pointer is wrong now" classes of bugs. It's possible to write logic errors, of course. You have to try much harder to write invalid state or memory errors.
- gpderetta 2y agoParent said bugs, not security bugs.
- grandempire 2y agoImagine a backlog full of buffer overflows and nil pointers.