pmderodat
Re:Learning Ada
on Thursday March 28, 2019 @01:10PM (#19514237)
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.