From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 10 Sep 93 17:06:16 GMT From: dst17!mab@ford-wdl1.arpa (Mark A Biggar) Subject: Re: Don't we already have a 'Valid? (was Re: Unchecked_Conversion...) Message-ID: <1993Sep10.170616.22415@wdl.loral.com> List-Id: In article <26q196INNl1t@umbc4.umbc.edu> berman@umbc.edu (Mike Berman) writes: >The prior discussion on unchecked_conversion has quite adequately >explained why the code I excerpted operates the way it does. The result >of the unchecked_conversion makes the program erroneous if it is not a >valid member of the target type. >The real question is why does the "type_mark" form of the "in" operator >exist? Most people use "in" solely for checking ranges within a scalar >type, but it is defined to operate on _any_ type. Since it can't be used >to check the results of unchecked_conversions, then why is it defined >for nonscalar types? Well in 9x, with tagged types it is useful for asking if a classwide variable is of a given tagged type. >And, as the subject line suggests, why not use the already-defined >syntax for the "in" operator _instead_ of adding the 'Valid attribute? The complier is allowed to optimize way an "in" operator, but is specifically forbiden to touch a 'VALID, otherwise they should act the same. -- Mark Biggar mab@wdl.loral.com