comp.lang.ada
 help / color / mirror / Atom feed
From: mheaney@ni.net (Matthew Heaney)
Subject: Re: 'size attribute inheritance
Date: 1997/08/13
Date: 1997-08-13T00:00:00+00:00	[thread overview]
Message-ID: <mheaney-ya023680001308972232470001@news.ni.net> (raw)
In-Reply-To: 33F250A4.2B42@flash.net


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
<mailto:matthew_heaney@acm.org>
(818) 985-1271




  reply	other threads:[~1997-08-13  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-09  0:00 'size attribute inheritance Carlos Palenzuela
1997-08-10  0:00 ` Robert Dewar
1997-08-11  0:00   ` Matthew Heaney
1997-08-11  0:00   ` Ken Garlington
1997-08-10  0:00 ` Matthew Heaney
1997-08-11  0:00   ` Robert Dewar
1997-08-12  0:00     ` Matthew Heaney
1997-08-13  0:00       ` Robert A Duff
1997-08-13  0:00         ` Matthew Heaney
1997-08-14  0:00           ` Robert A Duff
1997-08-14  0:00             ` Dale Stanbrough
1997-08-16  0:00           ` Robert Dewar
1997-08-16  0:00             ` Ken Garlington
1997-08-17  0:00               ` Robert Dewar
1997-08-18  0:00                 ` Robert A Duff
     [not found]                   ` <dewar.872433846@merv>
1997-09-03  0:00                     ` Robert A Duff
1997-09-06  0:00                       ` Robert Dewar
1997-09-08  0:00                         ` Robert A Duff
1997-08-17  0:00               ` Robert A Duff
1997-08-13  0:00       ` Ken Garlington
1997-08-13  0:00         ` Matthew Heaney [this message]
1997-08-10  0:00 ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox