4 ms·
It’s a good opportunity to point that Ada defines “bounded errors” and “erroneous execution” as distinct things. TLDR: reading uninitialized data in Ada is saf
by pmderodat 8y ago
It’s a good opportunity to point that Ada defines “bounded errors” and “erroneous execution” as distinct things.
TLDR: reading uninitialized data in Ada is safer than in C.
Reading an uninitialized OUT argument is a bounded error, which is much less dramatic than C’s undefined behavior: the semantics is that you’ll read an arbitrary value (which is obviously bad as far an program intent is concerned), but otherwise the language constraints still hold.
This is very different from erroneous execution, which is very similar to the famous undefined behaviors in C, in which all bets are off and anything can happen.
- steveklabnik 8y agoAh thank you! As I dig into the reference material, I’m sure I’ll gain this kind of nuance, but I appreciate you pointing this out! That indeed does also make it less dangerous.