On Wednesday, 11 January 2023 at 19:27:15 UTC, Walter Bright
wrote:
On 1/11/2023 3:26 AM, Paulo Pinto wrote:
It is kind of "solved", by turning all computers into C
machines,
What an amazing amount of work just to avoid adding dynamic
arrays to C.
Well, the companies don't get to single-handedly decide what
features to add or deprecate, thanks to C spec being written by
ISO, which is why they have developed their own PLs.
But also, adding dynamic arrays to C won't make the currently
existing C code safer, the one they care about, because no one's
gonna send the money to update their C89/99/whatever code to
C23/26. Even if they did, there's no guarantee others would as
well.
So when you can't change the world, what do you do?
You change yourself, and that's what they did, by making bounds
checking and whatnot part of the _hardware semantics_ itself, now
the C programmers get to be happy that the program still is 2
instructions long, while at the micro-architecture/microcode
level the checks are still getting performed.