“What the Hardware Does” Is Not What Your Program Does: Uninitialized Memory
The real issue is the C and C++ languages are horrible languages.  They&#x27;re too high-level to correspond to any real machine, yet so low-level so as to make such an abstract machine useful.  The C language leaves the precise lengths of types up for grabs, as merely one example.  As for Rust, I&#x27;d figure it&#x27;s poor as well, considering it follows in the footsteps of C++.<p>I can compile an Ada program that has an uninitialized variable and use it, but I get a warning; there&#x27;s also a <i>Valid</i> attribute that acts as a predicate for whether a scalar value has an acceptable value or not.<p>To @userbinator , you&#x27;re mistaken to believe the C has much design behind it.  There are many things where one requires a certain range of values and C forces the programmer to use a type that&#x27;s much larger than necessary and cope with unwanted values.  The C language leaves details to the underlying machine, so long as that machine is determined to pretend it&#x27;s a PDP-11.  Most languages that have a standard expect the programmer to follow it; since most C programmers don&#x27;t know what the standard says, having been lied to about it being a simple and base language, they&#x27;re offended when they do something they never should&#x27;ve done; they shouldn&#x27;t be using C anyway, however.<p>Abstract language details are necessary for a high-level language and can work quite well if the language is designed well; this then leaves high-level features to be implemented in whichever way is best for the machine; the C language doesn&#x27;t do this well at all, however, and precisely specifies the nature of irrelevant details and so hinders the machine and implementation possibilities.<p>The C language doesn&#x27;t even have true boolean values or arrays thereof.  You&#x27;re expected to use an entire integer that&#x27;s zero or not and you&#x27;re left to your own devices if you want an array of these values that isn&#x27;t grotesque in its wastefulness.  Meanwhile, most proper languages have the concept of types that only have two values and can easily use an underlying machine representation for efficiently representing these, without involving the programmer.<p>In closing, you may argue that C is necessary because it permits specifying these low-level details, albeit required in every case instead of only where necessary.  To that, I direct you to look at Ada, which permits the programmer to ignore such details wherever unneeded, and so leave them to the compiler’s discretion, but allows size, address, representation, bit-level organization, and more to be specified in those cases where it&#x27;s truly necessary.<p>Here&#x27;s a link others may like for learning more about Ada and the deficiencies of C:<p><a href="https:&#x2F;&#x2F;annexi-strayline.com&#x2F;blog" rel="nofollow">https:&#x2F;&#x2F;annexi-strayline.com&#x2F;blog</a>