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: Dale Stanbrough Subject: Re: 'size attribute inheritance Date: 1997/08/14 Message-ID: <5t018b$g3o$1@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 264822839 Distribution: world References: <33ECF679.4B5D@lmco.com> X-XXMessage-ID: Organization: Royal Melbourne Institute of Technology Newsgroups: comp.lang.ada Date: 1997-08-14T00:00:00+00:00 List-Id: Matthew Heaney, mheaney@ni.net writes: 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. I would still use strong typing even at this level. Obviously out of range values are a big problem, so don't declare types that could have out of range values. E.g. if you are reading in a 12 bit value from an A/D then declare... type AD_Reading is mod 2**12; You still get the benefits of strong typing (can't accidentally convert to an appropriately scaled/biased value) and no risk of Constraint_Error. Dale