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: 10db24,77f71d0bde4c5bb4 X-Google-Attributes: gid10db24,public X-Google-Thread: 103376,86fd56abf3579c34 X-Google-Attributes: gid103376,public From: Robb.Nebbe@di.epfl.ch (Robb Nebbe) Subject: Re: What good is halting prob? Date: 1995/04/19 Message-ID: <1995Apr19.113045@di.epfl.ch>#1/1 X-Deja-AN: 101107814 distribution: world references: <3kaksj$iur@isnews.calpoly.edu> content-type: text/plain; charset=iso-8859-1 organization: Ecole Polytechnique Federale de Lausanne mime-version: 1.0 newsgroups: comp.lang.ada,comp.edu Date: 1995-04-19T00:00:00+00:00 List-Id: : : If b was declared as a class member, then you can tell if it is initialized : by the constructor. In OOP, global data is a no-no, so b would either be : a class member or a local variable. Where an order of initialization : dependency exists between two objects, there could be some trouble, but : static initializers can deal with this (as in the standard library : iostreams.h). If b is a local it is even easier to detect initialization. : With reasonable constraints on the language, detecting initialization seems : feasible to me. What am I missing? You always have the three cases: it is initialized, it isn't initialized or you can't tell. By carefully designing the language (or through careful use of the language) you can eliminate the case where you can't tell. But then you are not dealing with a general solution; you have restricted the problem space to a particular case of interest which is often sufficient. By the way default constructors really don't count as initialization. They have a legal value but often it isn't meaningful -- it is just some neutral value. Robb Nebbe