2 ms·
>The beginning of the end of use-after-free, buffer overflows, stack smashers, et al will be when we as a community finally accept that C is a terrible language
by GrumpyYoungMan 10y ago
>The beginning of the end of use-after-free, buffer overflows, stack smashers, et al will be when we as a community finally accept that C is a terrible language, impossible for ordinary humans to reason about, and must be abandoned.
1) All the complaints you have apply equally well to assembly language, yet assembly language is all that the CPU understands. Somebody always has to deal with the low level complexity of writing the foundational software constructs necessary to build safe environments and C is still the most natural mapping to varied assembly languages that we have.
2) Nothing else will fit for many embedded systems. Your choices are C or assembly language. What safe environment/language are you going to fit into a microcontroller with 1kB of RAM?
(And, yes, maybe Rust or one of the other proposed system language replacements will be better than C someday, but that someday isn't today.)
- dragonwriter 10y ago> All the complaints you have apply equally well to assembly language, yet assembly language is all that the CPU understands. No, machine code is all that the CPU understands. Assembly language is source code that gets converted into machine code by an assembler.