4 ms·
While this is technically true, it isn't practically true. "Easy" is certainly false. I really enjoyed these posts by strncat: https://www.reddit.com/r/progra
by staticassertion 10y ago
While this is technically true, it isn't practically true. "Easy" is certainly false.
I really enjoyed these posts by strncat:
https://www.reddit.com/r/programming/comments/5krztf/rust_vs_c_pitfalls/dbr7d7u/?context=3 https://www.reddit.com/r/programming/comments/5krztf/rust_vs...
> It's scary how unfamiliar C programmers are with the rules of the language they're using... it's very difficult to write correct / secure C code without undefined behavior even when you know the rules.
[...]
> It's not feasible to avoid undefined behavior at scale in C or C++ projects. It's simply infeasible. They are not usable as safe tools without using a very constrained dialect of the languages where nearly all real world code would be treated as invalid, with annotations required to prove things to the compiler and communicate information about APIs to it.