4 ms·
In case with coreutils, as I remember, there were mostly race conditions. Not memory safety issues. Maybe we just need better I/O libraries.
by codedokode 3mo ago
In case with coreutils, as I remember, there were mostly race conditions. Not memory safety issues. Maybe we just need better I/O libraries.
- uecker 3mo agoOr use a buffer abstraction in C. This is not exactly rocket science. The "this is impossible to prevent in C" nonsense does far more harm than good.
- codedokode 3mo agoTo be fair, C is a pain to use, so it is better to improve Rust. It is annoying when for example, you have to free several allocated structures when there is an error in the middle of a functon.
- uecker 3mo agoI personally like to use C and find Rust annoyingly complex. I think it may be an alternative to C++, but C++ is also too complex for my taste. I do not find it annoying to free several allocated structures when there is an error, but one could also automate this with a often used extension. There is also the question whether trading memory safety against supply chain risks is really worth it.
- shermantanktop 3mo agoErrors are easily found and corrected for a modest one-person project in C. But we’re combining probability of error creation (which is effectively constant) and the limits of human cognition. Some things are impossible at one scale, become possible at another, and become inevitable at yet another.