From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,803df5f3f60558d5 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Uninitialized "out" parameters Date: 1996/07/21 Message-ID: #1/1 X-Deja-AN: 169435896 references: <4smh9i$gp5@krusty.irvine.com> <31EF9DFC.6FB4@csehp3.mdc.com> <4ss763$2aq@felix.seas.gwu.edu> <4ssn9r$p6e@mulga.cs.mu.OZ.AU> <4ste71$hg8@felix.seas.gwu.edu> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-07-21T00:00:00+00:00 List-Id: Mike said "That is a different issue. If Ada _compelled_ initialization, it would be trivial to determine whether all variables were initialized. Certainly the compiler could "enforce" initialization; if you failed to supply an initializer, the compiler would supply a default. There have been earlier threads on why Ada does not compel initialization." No, that's not quite right, there are other ways for the value of a variable to become abnormal, and therefore not guaranteed to be set to a known value. OK, this is not quite the same as never having been initialized, but from a practical point of view, it is the same from the programmer's point of view, namely you have a variable which you better not reference, and it is undecidable whether a given reference runs into trouble with such an abnormal value. Some ways in which values can become abnormal are through the occurrence of an exception during an assignment, through asynchrnonous interruption of a task (via abort or ATC), or via a bad unchecked conversion.