comp.lang.ada
 help / color / mirror / Atom feed
From: Charles Hixson <charleshixsn@earthlink.net>
Subject: Re: Disallowing Pre-Defined Operations
Date: 2000/03/20
Date: 2000-03-20T00:00:00+00:00	[thread overview]
Message-ID: <38D6541E.D2D654AB@earthlink.net> (raw)
In-Reply-To: 8b0p33$afd$1@nnrp1.deja.com

My understanding was that there were separate modules coded
correctly internally, that were operating on the basis of different
units, and that the problem probably occurred where the two modules
communicated, that their hand-shaking didn't identify the unit in
use (each assuming that its own unit was, of course, the one to
calculate with), so what was passed was an untyped numeric.

Thus the problem was that using units is a LOT of work in just about
every environment, so people tend to avoid it, when it seems
"obviously unnecessary".  A system that allows units to be specified
easily and inter-converted automatically would be both save and
easy.  That's what units were designed for.  Kilometers can convert
to feet, but not to pounds, etc.  Both, however, look just like
numbers if you strip off their units.  And also kilometers look just
like meters.  I'm currently working on an application that displays
dollars rounded off to thousands.  Because of the problem of keeping
the units straight I am actually maintaining a count in cents right
up to the display step, and then dividing in the display.  This
keeps me from mixing up the units (the application is in VB, so you
can guess how easy THAT would be), but it does keep me from even
THINKING about such refinements as bucket rounding.  I.e., it's
nearly adequate for this job, but v. far from ideal.  OTOH, screen
painting and report formatting in VB (MSAccess, actually) is
*!*SO*!* much easier than in Ada.

OTOH, I am operating off of memories of NASA public reports, I
didn't go digging.  I could have the details wrong for this time.
That wouldn't convince me that the general principle was wrong (but
then nearly all of my work has been in a language other than
Ada...perhaps Ada types are already strong enough to easily handle
the problem).

Robert Dewar wrote:

> In article <38D2ACA9.84FBD9F6@earthlink.net>,
>   Charles Hixson <charleshixsn@earthlink.net> wrote:
> >
> > That would have saved at least one space probe.  (By that here
> > I mean the automatic conversion of units.)
>
> If you are talking about the Mars probe, that is unconvincing.
> As you know if you have read the details, the issue was simply
> that the value was entered in the wrong units. No feature in
> a language could have prevented this. If the programmer had
> been alert enough to worry about this happening and use some
> kind of typed units aware input, then the entire problem would
> not have occured, after all a sufficient fix here would simply
> have been to make it super-clear what units were expected.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.





  reply	other threads:[~2000-03-20  0:00 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-10  0:00 Disallowing Pre-Defined Operations Charles H. Sampson
2000-03-09  0:00 ` Keith Thompson
2000-03-09  0:00 ` Samuel T. Harris
2000-03-12  0:00   ` Steven Hovater
2000-03-10  0:00 ` mark_biggar
2000-03-10  0:00 ` Jean-Pierre Rosen
2000-03-11  0:00   ` Tarjei Tj�stheim Jensen
2000-03-11  0:00     ` James S. Rogers
2000-03-13  0:00       ` Tarjei T. Jensen
2000-03-13  0:00     ` Robert Dewar
2000-03-13  0:00       ` Keith Thompson
2000-03-15  0:00         ` Robert Dewar
2000-03-13  0:00     ` dmitry6243
2000-03-15  0:00     ` Charles H. Sampson
2000-03-15  0:00       ` Robert Dewar
2000-03-21  0:00         ` Charles H. Sampson
2000-03-21  0:00           ` Robert Dewar
2000-03-21  0:00           ` Robert A Duff
2000-03-12  0:00   ` claveman
2000-03-12  0:00     ` Robert A Duff
2000-03-13  0:00       ` Tarjei T. Jensen
2000-03-13  0:00         ` Robert A Duff
2000-03-13  0:00         ` Robert Dewar
2000-03-15  0:00       ` Charles H. Sampson
2000-03-15  0:00         ` Tucker Taft
2000-03-15  0:00           ` Paul Graham
2000-03-16  0:00             ` Robert Dewar
2000-03-16  0:00             ` Charles Hixson
2000-03-17  0:00               ` Paul Graham
2000-03-17  0:00                 ` Charles Hixson
2000-03-18  0:00                   ` Robert Dewar
2000-03-20  0:00                     ` Charles Hixson [this message]
2000-03-20  0:00                       ` Robert Dewar
2000-03-16  0:00           ` Tarjei T. Jensen
2000-03-16  0:00             ` mark_biggar
2000-03-16  0:00             ` Dale Stanbrough
2000-03-16  0:00           ` Bryce Bardin
2000-03-17  0:00         ` Robert A Duff
2000-03-13  0:00     ` Ted Dennison
2000-03-14  0:00 ` Nick Roberts
2000-03-15  0:00   ` Robert Dewar
2000-03-17  0:00 ` William A Whitaker
2000-03-18  0:00   ` Robert Dewar
2000-03-18  0:00   ` Robert Dewar
2000-03-18  0:00   ` Robert Dewar
2000-03-22  0:00     ` William A Whitaker
2000-03-23  0:00       ` Robert Dewar
2000-04-06  0:00         ` Robert I. Eachus
2000-04-05  0:00           ` Marin D. Condic
2000-04-06  0:00             ` Robert Dewar
2000-04-06  0:00               ` Marin D. Condic
2000-04-07  0:00                 ` Robert Dewar
2000-04-07  0:00                   ` Marin D. Condic
2000-04-07  0:00                 ` dale
2000-04-07  0:00                   ` Marin D. Condic
2000-04-07  0:00                     ` Tarjei T. Jensen
2000-04-07  0:00                       ` Marin D. Condic
2000-04-07  0:00                         ` tmoran
2000-04-07  0:00                           ` Marin D. Condic
2000-04-08  0:00                             ` Vladimir Olensky
2000-04-08  0:00                             ` Vladimir Olensky
2000-04-08  0:00                         ` Dale Stanbrough
2000-04-10  0:00                         ` Tarjei T. Jensen
2000-04-15  0:00                         ` Niklas Holsti
2000-04-15  0:00                           ` Marin D. Condic
2000-04-09  0:00               ` Robert I. Eachus
replies disabled

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