You must log in or # to comment.
This was an excellent example of why C is not a safe language lol.
Quite interesting, that the author uses code which looks more like C than C++ :) Anyway, there is also a second part too: https://craftofcoding.wordpress.com/2021/04/02/c-versus-ada-for-safety-critical-software-ii/
The difference between C and C++ is interesting here. C++ enables you to build abstractions to lower error risk (bounded integers, range checked containers, …) but C++ is also much more complex and that increases error risk.
Why isn’t Rust mentioned? It should at least be worth mentioning, since Rust has been getting more and more real-world usage in safety critical software.
Rust is used in safety-critical software? Citation please.