Re:Learning Ada
by steveklabnik on Thursday March 28, 2019 @01:14PM
(#19514299)
Ah 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.
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.