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,45a9122ddf5fcf5 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Rules for Representation of Subtypes Date: 1996/09/28 Message-ID: <1996Sep28.155354.1@eisner>#1/1 X-Deja-AN: 185915521 x-nntp-posting-host: eisner.decus.org references: <1996Sep26.191257.1@eisner> x-nntp-posting-user: KILGALLEN x-trace: 843940441/3846 organization: LJK Software newsgroups: comp.lang.ada Date: 1996-09-28T00:00:00+00:00 List-Id: In article , bobduff@world.std.com (Robert A Duff) writes: > In article <1996Sep26.191257.1@eisner>, > Larry Kilgallen wrote: >>Like: >> >> if X'Valid >> >>? I would think that as being an argument in _favor_ of declaring >>the C-updated object in a tightly constrained fashion. > > No, that won't work. By the time you get to that if statement, the > program execution is already erroneous. Compilers can and do (and > should) take advantage of that fact to generate faster code that doesn't > work. An unchecked conversion is a function call, and there's no way to > capture the result of it without assigning it somewhere, which causes > erroneousness if the result is bad. If the assignment of the output causes erroneousness, then why isn't the name of the operation Checked Conversion ? Larry Kilgallen