|
|
|
|
|
by pcwalton
3687 days ago
|
|
The lack of bounds checking is one of the biggest problems in C, but there are worse problems (use after free) that nobody has even thought of a solution for. > That widely-used C compilers don't do that is a strong hint there are other, real-world constraints in place. Yes. Those constraints are self-inflicted wounds caused by the fact that C wasn't designed for this. If you have a proper iterator API, a culture of unsigned array indexing, widespread use of a size_t equivalent instead of int for loops, etc. etc. these issues vanish. |
|