Oh that’s neat. That makes me feel a lot better. I mean I get that the systems were probably embedded and that everything was defined, but it’s relieving to hear that a segmentation fault or dangling pointer would generally be avoided.
Ada is a language that leaves a lot of things “implementation dependent” as it’s not supposed to grant easy access to underlying data types like those you’ll find in C, or literally on the silicon. You’re supposed to be able to declare your own integer type of any size and the compiler is supposed to figure it out. If it chooses to use a native data type, then so be it.
This doesn’t guarantee the correctness of the compiler nor the programmer who absolutely has to work with native types because it’s an embedded system though.
Don’t they use super statically verifiable code for these kinds of applications? Like, Ada?
Sort of. We used C, but no dynamic memory allocation.
Oh that’s neat. That makes me feel a lot better. I mean I get that the systems were probably embedded and that everything was defined, but it’s relieving to hear that a segmentation fault or dangling pointer would generally be avoided.
Ada is a language that leaves a lot of things “implementation dependent” as it’s not supposed to grant easy access to underlying data types like those you’ll find in C, or literally on the silicon. You’re supposed to be able to declare your own integer type of any size and the compiler is supposed to figure it out. If it chooses to use a native data type, then so be it.
This doesn’t guarantee the correctness of the compiler nor the programmer who absolutely has to work with native types because it’s an embedded system though.
This has ended in disaster at least once: https://itsfoss.com/a-floating-point-error-that-caused-a-damage-worth-half-a-billion/