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,ad4aec717fd8556e X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: 'size attribute inheritance Date: 1997/08/13 Message-ID: #1/1 X-Deja-AN: 264562994 References: <33ECF679.4B5D@lmco.com> <33F250A4.2B42@flash.net> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-08-13T00:00:00+00:00 List-Id: In article <33F250A4.2B42@flash.net>, Ken.Garlington@computer.org wrote: >> Consider yourself fortunate that you get any indication that a value is >> outside its constrained range. But even then, if you're flying a plane >> controlled by software that has an illegal value for an object, is a core >> dump really want you'd want to happen? > >No; on the other hand, you don't want to either weaken the typing >abilities >of Ada, nor do you want to introduce too many base types. The intent of >your rule can be followed with constrained subtypes, so long as you >understand the nature of your I/O device. I wouldn't suggest giving up strong typing completely, only at the interface layer of the system, where you're touching the metal (ie whenever you write O'Address). Whatever data an interface abstraction presents to the rest of the system should be strongly typed, but I recommend that in the implementation of that abstraction, weak types be used to read in the data, and that the range of the input data be checked manually. -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271