logoalt Hacker News

chuckadams • today at 3:03 PM • 1 reply • view on HN

Both of them memory safety issues. C is just not fit for purpose in this decade.


Replies

rbanffy • today at 4:00 PM

C is not to blame for programmers using its features unwisely and, as a result, writing buggy code. Writing secure C code requires discipline, and, most likely, keeping yourself limited to a subset of the language.

This is why languages like Rust have their place - their compilers impose the discipline and the restraint C doesn't. It's not impossible to write code with memory safety issues in Rust - it's just a lot harder. I remember saying the same about Java - it doesn't make writing the program any easier, but it makes writing some bugs difficult.

➕ show 6 replies