4 ms·
Memory safety issues are exaggerated. It's definitely harder to keep big, complex software memory sanitised, but it's not something completely insurmountable.
by baybal2 5y ago
Memory safety issues are exaggerated. It's definitely harder to keep big, complex software memory sanitised, but it's not something completely insurmountable.
You use C judiciously on the most performance demanding tasks, while trying to bring the overall task itself closer to some simple algorithm, on which you can later throw heavy verification, like formal verification, valgrind it to death, fuzzing etc.
The current wave of "new age" computer languages like Koltin, Go, Rust have a very noisy activist userbase which tend to extol some very simple, obvious things as ultimate virtues.
- thargor 5y agoMemory safety issues are bugs. Do you know any programmer that does not occasionally create bugs? Don't forget tight schedules, low budgets, ... Also rust is just what you propose that - a programming language integrated with heavy verification of safeness built-in. Because occasionally someone writes c code without using all available tools to verify the code it is better to have it built in.
- baybal2 5y ago> Do you know any programmer that does not occasionally create bugs? Don't forget tight schedules, low budgets, ... Do not run programming in C on tight schedules, and low budgets. It needs tact, and understanding.
- matthewmacleod 5y ago“Have you simply considered not having bugs” isn’t a useful strategy though.
- 10000truths 5y agoMemory safety is not an issue if you actually learn to take advantage of the C toolchain. I've caught memory leaks and buffer overflows to great effect just by using Valgrind and ASAN. And for most applications, you can limit the attack surface by only writing C for the performance-sensitive areas and using FFI to call into those routines. As a bonus, it becomes much easier to unit test for logical corner cases.
- seanieb 5y agoThis just isn’t true in practice. Can you point to a popular c project that’s accomplished this? I bet there are a few tiny ones that make such claims but haven’t received scrutiny.
- letsgotothemoon 5y agoIIUC, it needs extensive code coverage and it's even difficult for library (the lws case).
- pjmlp 5y agoIt helps 40 years of wasted advocacy how good programmers never do errors with C. I can´t wait for governments to make security exploits liable, then lets see how much software will still be written in C, or derived languages.