| ▲ | rbanffy an hour ago | ||||||||||||||||||||||
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. | |||||||||||||||||||||||
| ▲ | kstrauser an hour ago | parent | next [-] | ||||||||||||||||||||||
> 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. It sure is to blame. Evidence shows you need wisdom, discipline, and an impossibly high bar of encyclopedic knowledge of every feature of C and all common libc's combined with an inhuman perfection of never once making a single typo, and a vast amount of tooling to analyze the code and find some of the bugs that made it through anyway. The best, most trusted, most accomplished C programmers I could name still have a track record of writing vulnerabilities triggered by C footguns, not just garden variety logic bugs that could affect code written in any language. Can I write more diligent C code than the OpenBSD team? Than the Linux devs? Than Fabrice "I made everything" Bellard? Not a chance, but C has bitten each of them. Us mortals don't stand a chance. | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | cowlevel an hour ago | parent | prev | next [-] | ||||||||||||||||||||||
Yes and no. I'd say there's nothing wrong with C - it's not evil - but maybe we still shouldn't use it because we should demand things C doesn't provide. There's nothing wrong with assembly code either but we rarely use it. | |||||||||||||||||||||||
| ▲ | chuckadams an hour ago | parent | prev | next [-] | ||||||||||||||||||||||
> C is not to blame for programmers using its features unwisely "Make no mistakes" works about as well for humans as it does for AI, and we have decades of lived experiences to draw on for that verdict. | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | echelon 22 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||
C allows you to express things easily which should not be easily expressable. When people do these things it is almost always in error. That is the fault of the language. | |||||||||||||||||||||||
| ▲ | Ar-Curunir an hour ago | parent | prev [-] | ||||||||||||||||||||||
“C cannot fail; it can only be failed” | |||||||||||||||||||||||