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,c1131ea1fcd630a X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: To Initialise or not Date: 1996/05/01 Message-ID: #1/1 X-Deja-AN: 152462345 references: <318508FE.204B@sanders.lockheed.com> <318792E8.28CC1042@escmail.orl.mmc.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-05-01T00:00:00+00:00 List-Id: In article <318792E8.28CC1042@escmail.orl.mmc.com>, Theodore E. Dennison wrote: >Yes, but I don't think any compiler COULD easily help enforce this (It >sounds a lot like the halting problem to me). That is what code >walkthroughs are for. A compiler can *easily* detect uninitialized variables at run time. Yes, it's nicer to know about it at compile time, when possible, but as you say, it's not *always* possible. You can (and should) use code walkthroughs to detect divide-by-zero, too. But Ada still detects that problem at run time (in case the code walk through missed something). The problem with detecting uninit vars at run time is of course efficiency. Plus the fact that it *might* make interfacing to other languages and/or hardware more difficult. - Bob