If maintaining these invariants were so simple, why would the smartest people in the industry have so much trouble doing so? Humans cannot consistently write correct C, not even the ones who believe they can. We have decades of evidence.
> Most languages replace these with multi-dimensional string based hashmaps that have much more complex invariants to keep track of and similar consequences for failing to do so.
This take reflects a profound ignorance of the relative severity of different kinds of software defect.
When you get an array bound wrong in Java or Rust, you get an exception or a panic. Your program exits and restarts. You get a ticket for fixing the bug. Life goes on.
When you get an array bound wrong in C, you open the door for a nefarious actor to gain control over everything that your program can access.
These aren't similar consequences. They're not even on the same planet of consequences. C apologists are like apologists for asbestos and lead paint.