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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4c459ff0adb576bc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-20 01:59:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!newscon01.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr11.news.prodigy.com.POSTED!not-for-mail From: "Pat Rogers" Newsgroups: comp.lang.ada References: <3C5AB0B7.9D75D49A@grammatech.com> <3c639940@pull.gecm.com> <4519e058.0202080714.1bf916bb@posting.google.com> <3C65BFF4.F15A07D0@earthlink.net> <3C7324BF.996E182B@adaworks.com> Subject: Re: Refactoring and Ada X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: NNTP-Posting-Host: 208.191.180.40 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr11.news.prodigy.com 1014199112 ST000 208.191.180.40 (Wed, 20 Feb 2002 04:58:32 EST) NNTP-Posting-Date: Wed, 20 Feb 2002 04:58:32 EST Organization: Prodigy Internet http://www.prodigy.com X-UserInfo1: Q[RGWWCEJKVOBTT^]BCB^]\@PJ_^PBQLGPQRJWQHBATBTSUBYFWEAE[YJLYPIWKHTFCMZKVMB^[Z^DOBRVVMOSPFHNSYXVDIE@X\BUC@GTSX@DL^GKFFHQCCE\G[JJBMYDYIJCZM@AY]GNGPJD]YNNW\GSX^GSCKHA[]@CCB\[@LATPD\L@J\\PF]VR[QPJN Date: Wed, 20 Feb 2002 09:58:32 GMT Xref: archiver1.google.com comp.lang.ada:20165 Date: 2002-02-20T09:58:32+00:00 List-Id: "Richard Riehle" wrote in message news:3C7324BF.996E182B@adaworks.com... > It turns out that 'Valid is not as useful as many of us thought it was. For > example, the result of an erroneous result from unchecked conversion, > which we originally thought was harmless if we checked it ourselves > with 'Valid before using it is a problem. Consider the following, > > type X is ... ; > type Y is ... ; > > function Convert is new Ada.Unchecked_Conversion > (Source => Y, Target => X); > > > X := Convert (Y); -- suppose X is erroneous or not valid > if X'Valid then ... -- We used to think this was OK. > -- Some compilers fail on this because of an > interpretation > -- of the ALRM rules. > > At present, one must wonder about the usefulness of 'Valid. What's the exegesis for this?