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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public From: "Norman H. Cohen" Subject: Re: OO, C++, and something much better! Date: 1997/01/10 Message-ID: <32D6A0B8.128C@watson.ibm.com>#1/1 X-Deja-AN: 209004702 references: content-type: text/plain; charset=us-ascii organization: IBM Thomas J. Watson Research Center mime-version: 1.0 reply-to: ncohen@watson.ibm.com newsgroups: comp.lang.ada x-mailer: Mozilla 3.0 (Win95; I) Date: 1997-01-10T00:00:00+00:00 List-Id: (This note, concerned only with a esoteric nit about Ada, is posted only to comp.lang.ada.) Robert Dewar wrote: > Note that it is not actually the unchecked conversion that is nasty, since > the fundamental conversion can be modeled as simply a random mapping between > values of one type to values of another type. It is that these operations > can generate abnormal values. > > This may still not be a problem, given that uninitialized values can also > be abnormal, thus: > > a := nasty_unchecked_conversion (b); > > is no worse that not assigning to a at all if a is uninitialized. No, uninitialized variables may be "invalid", but not "abnormal". Abnormal is worse than invalid. Even uninitialized objects of a composite type might satsify certain conditions (e.g. gaps between record components set to zero, dope vectors properly initialized, etc.) that an abnormal value violates. -- Norman H. Cohen mailto:ncohen@watson.ibm.com http://www.research.ibm.com/people/n/ncohen