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,f70e7a457bf23e69 X-Google-Attributes: gid103376,public From: edward@igate1.hac.com (Ed Bruce) Subject: Re: Optimizing and Constraint Checks Date: 1995/03/29 Message-ID: #1/1 X-Deja-AN: 100540687 references: <3kuhpo$ban@theopolis.orl.mmc.com> organization: Hughes Aircraft newsgroups: comp.lang.ada Date: 1995-03-29T00:00:00+00:00 List-Id: In article <3kuhpo$ban@theopolis.orl.mmc.com>, Theodore Dennison wrote: > Your engineer has a vaild concern. One of the problems with Ada 83 is that > there is no PORTABLE way to force a constraint check. In practice, you have > to find what your compiler won't optimize away, and code to that. > Unfortunately, the next version of the same compiler could work differently. > I have suggested that we use 'IMAGE and 'VALUE with enumeration types that are stored in the database. First I believe this to be more portable and likely to guarantee constraint checking will be performed in all validated compilers. Second it is more likely to catch illegal values in the database when we change enumeration_literals and fail to update the database correctly(maintenace issue). Your last sentence is the crux of the problem. Change vs. stability. Today's solution is tomorrow's problem. -- Ed Bruce edward@igate1.hac.com