comp.lang.ada
 help / color / mirror / Atom feed
From: "Bennett, Chip (KTR) ~U" <BennettC@J64.STRATCOM.AF.MIL>
Subject: Re: Why don't large companies use Ada?
Date: Thu, 1 Dec 1994 11:06:00 PST
Date: 1994-12-01T11:06:00-08:00	[thread overview]
Message-ID: <2EDE1E07@SMTPGATE2.STRATCOM.AF.MIL> (raw)

ron house <house@HELIOS.USQ.EDU.AU> wrote:

> How about "Ada - use it when you want to multiply a length by a length
> and get a length, or when you want to be prevented from dividing an area
> by a length because they have different types."

> (PS: yes, you can fix that by defining zillions of additional *,/,- and +
> functions, but good grief...)

It seems to me that how many functions you have to define depends on how you
approach the problem.  Let's start with the premise that there are many
triples of numbers that exhibit similar relationships.  For example:

     1) length, 2 (squared), area
     2) length, 3 (cubed), volume
     3) length, N, hyperspace  :-)

Or perhaps a different relationship:

     1) speed, time, distance
     2) principle, rate, interest
     3) mass, acceleration, force
     4) current, resistance, voltage
     5) mass, (light speed) squared, energy
     6) large unit of measure, constant, small unit of measure

Now, we ought to be able to create a generic package that declares a set of
allowable functions for a particular relationship (A := B * C, C := A / B,
etc.).  Then we could create a package that declares a set of private types
(i.e. speed, time, and distance) and instantiates the generic package of
math functions using the private types.  Since the types are private they
are limited to the functions in the instantiated generic.  Area := Length **
2 is allowed, but Length := Length ** 2 is not allowed.

In Ada 83 there is a limitation in that we can't extend the set of allowable
functions for some triple that has some _extra_ relationship that the others
don't have, but child packages in Ada 9X would allow for adding new
functions to the private type.

Given that there is a fairly limited set of relationship groups for triples
that make sense in the real world, I doubt you would have to write very many
additional math functions.

All that said, I've never actually tried this, but it seems plausible.  Any
thoughts?

*****************************************************************
* Chip Bennett, GDE Systems Inc | BennettC@j64.stratcom.af.mil  *
* USSTRATCOM/J64213             | Voice (402)294-7360           *
* 901 SAC Blvd, Suite 2B24      | FAX   (402)294-7912           *
* Offutt AFB, NE 68113-6600     | Proud member of Team Ada      *
* Opinions expressed here are my own _so_,  TTFWTW              *
*****************************************************************



             reply	other threads:[~1994-12-01 19:06 UTC|newest]

Thread overview: 202+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-01 19:06 Bennett, Chip (KTR) ~U [this message]
  -- strict thread matches above, loose matches on Subject: below --
1994-12-08  2:00 Why don't large companies use Ada? Kenneth G. Hamilton
1994-12-09 11:49 ` Robert Dewar
1994-12-07  0:49 Paige Vinall
1994-12-06 18:00 Bob Wells #402
1994-12-06 17:05 Bob Wells #402
1994-12-06 13:06 Paige Vinall
1994-12-07 14:15 ` Norman H. Cohen
1994-12-09  2:31 ` Michael Feldman
1994-12-03 20:49 Paige Vinall
1994-12-02  5:29 Robert Dewar
1994-12-01 22:08 Bennett, Chip (KTR) ~U
1994-12-01  4:32 Jeff Gray
1994-12-02 21:25 ` Michael Feldman
1994-11-30  5:21 Peter Coffee AC6EN
1994-11-14  4:17 Jamie Jamison
1994-11-14 14:19 ` R. William Beckwith
1994-11-14 22:07   ` Jeff Reinholz
1994-11-15  2:36     ` R. William Beckwith
1994-11-18 22:19     ` Christopher K. Krebs
1994-11-19 17:44       ` Jean D. Ichbiah
1994-11-20  7:09         ` R. William Beckwith
1994-11-20 17:18           ` Robert Dewar
1994-11-20 17:21           ` Robert Dewar
1994-11-20 23:32             ` Cyrille Comar
1994-11-21 15:02             ` R. William Beckwith
1994-11-20 23:37           ` Jean D. Ichbiah
1994-11-21  2:20             ` David Weller
1994-11-23 23:19               ` Jean D. Ichbiah
1994-11-21 14:53             ` R. William Beckwith
1994-11-22 13:56               ` Robert Dewar
1994-11-23 23:40               ` Jean D. Ichbiah
1994-11-22 20:08         ` Michael Feldman
1994-11-21 10:35       ` David Emery
1994-11-14 23:04   ` Robert Temple
1994-11-16 14:14     ` Doug Robertson
1994-11-16 23:47       ` Robert Dewar
1994-11-23  3:03         ` mat
1994-11-17  3:05       ` Michael Feldman
1994-11-17  3:07       ` Michael Feldman
1994-11-17 19:50       ` Robert C. Lokerson
1994-11-18  3:48         ` Michael Feldman
1994-11-22 16:43       ` James Hopper
1994-11-25 18:32         ` Carlos Perez
1994-11-25 20:26           ` Michael Feldman
1994-11-28  8:47             ` Tarjei Jensen
1994-11-28 16:23               ` Michael Feldman
1994-11-29  5:49                 ` Matt Kennel
1994-11-29 17:11                   ` Michael Feldman
1994-11-29  9:42                 ` Tarjei Jensen
1994-11-29 15:42                 ` Dave Vernest
1994-11-30 15:36                   ` Ole-Hjalmar Kristensen TF.DT/DELAB
1994-11-30 16:46                   ` An Amoeba
1994-11-30 17:39                     ` Jules
1994-11-30 14:05                       ` David Emery
1994-12-01  2:48                         ` R. William Beckwith
1994-12-04 15:06                           ` John Goodsen
1994-12-05  5:04                             ` R. William Beckwith
1994-12-02 15:18                       ` Akopov Mikhail
1994-12-05 14:52                         ` Jules
1994-12-01  1:04                     ` David Weller
1994-12-01 14:16                     ` Robert I. Eachus
1994-12-01 22:29                     ` Robert Dewar
1994-12-02  7:57                       ` Scott McLoughlin
1994-12-02 16:50                         ` Andrew Koenig
1994-12-02 10:32                       ` Robert I. Eachus
1994-12-02 22:57                         ` Mike Chapman
1994-12-05 15:59                           ` Norman H. Cohen
1994-12-10 17:37                           ` D'Arcy J.M. Cain
1994-12-11  2:08                             ` M. J. Saltzman
1994-12-11 17:43                             ` Andrew Koenig
1994-12-15 18:06                               ` John Goodsen
1994-12-12 12:58                             ` Con Bradley
1994-12-12 21:13                               ` Ian S Nelson
1994-12-13 10:44                               ` Ross Mather
1994-12-14 16:17                                 ` Peter Seebach
1994-12-03 11:07                       ` Markus Freericks
1994-12-05 16:43                       ` James Kanze US/ESC 60/3/141 #40763
1994-12-05 21:51                         ` Bart_van_der_Worp
1994-12-07 17:49                           ` Chris Dollin
1994-12-08 23:50                             ` Bart_van_der_Worp
1994-12-09  0:07                         ` Alistair James Robert Young
1994-12-09 12:47                           ` Jules
1994-12-10 16:29                             ` Brian Stern
1994-12-13 16:52                             ` Pete Gontier
1994-12-16 19:53                               ` Dr. Richard Botting
1994-12-09 19:15                           ` Robert Firth
1994-12-05 16:43                       ` James Kanze US/ESC 60/3/141 #40763
1994-12-03  9:49                     ` Stephen Benson
1994-12-04 22:59                       ` Michael Feldman
1994-11-30 17:26                   ` Jules
1994-11-30 20:17                   ` Norman H. Cohen
1994-12-05 21:54                     ` Stef Van Vlierberghe
1994-12-06  7:33                       ` Geens Ronald
1994-12-07 20:02                       ` Jules
1994-12-02 17:17                   ` Tucker Taft
     [not found]                 ` <house.786178243@helios>
1994-11-30 23:01                   ` Michael Feldman
1994-12-01 20:35                     ` Matt Kennel
1994-12-04 22:16                       ` Michael Feldman
1994-12-08 14:27                         ` gamache
1994-12-09 10:27                           ` Peter Hermann
1994-12-02  8:23                     ` Paul Johnson
1994-12-02 15:11                       ` Robert I. Eachus
1994-12-07  9:48                       ` Stephen J Bevan
1994-12-08  8:16                         ` Paul Johnson
1994-11-30 23:10                   ` Richard Riehle
1994-12-01  3:14                   ` Michael Coburn
1994-12-02 23:46                     ` Bob Duff
1994-12-05 15:08                       ` Jules
1994-12-05 19:10                         ` Bob Duff
1994-12-01 21:02                   ` Robert Dewar
1994-12-02 21:36                     ` Michael Feldman
1994-12-03 18:44                       ` David Weller
1994-12-05 15:37                       ` Norman H. Cohen
1994-12-05 16:11                         ` M. J. Saltzman
1994-12-06  2:37                           ` Michael Feldman
1994-12-06 12:33                             ` M. J. Saltzman
1994-12-06 15:30                               ` Arne Dehli Halvorsen
1994-12-05 19:14                         ` Bob Duff
1994-12-06 13:22                         ` Robert Dewar
1994-12-06 17:14                           ` Mark S. Hathaway
1994-12-05 15:23                     ` Norman H. Cohen
1994-12-05 23:48                       ` Thomas M. Breuel
1994-12-01 21:11                   ` Sten Drescher
1994-11-28 14:00             ` Robert Dewar
1994-11-28 14:02             ` Robert Dewar
1994-11-28 14:27               ` Robert I. Eachus
1994-11-29  4:05                 ` Michael Feldman
1994-11-29 18:24                   ` IanMaclure
1994-11-30 16:26                     ` David Weller
1994-12-01 21:24                       ` Robert Dewar
1994-11-30  8:41                   ` Paul Johnson
1994-11-30 23:07                     ` Michael Feldman
1994-11-30 19:53                   ` Davidson Corry
1994-11-30 20:15                   ` Richard Riehle
1994-12-01 15:28                     ` Paige Vinall
1994-12-02  5:25                     ` Robert Dewar
1994-12-02 21:45                       ` Michael Feldman
1994-12-03  5:43                         ` Keith Thompson
1994-12-04 22:39                           ` Michael Feldman
1994-12-05 22:57                             ` Robert Dewar
1994-12-06  2:48                               ` Michael Feldman
1994-12-08  4:10                                 ` Robert Dewar
1994-12-06  3:29                             ` Keith Thompson
1994-12-08 10:49                               ` Robert Dewar
1994-12-08 10:51                               ` Robert Dewar
1994-12-09  1:50                                 ` Keith Thompson
1994-12-09  3:16                                 ` Michael Feldman
1994-12-10 13:50                                   ` Robert Dewar
1994-12-10 13:51                                   ` Robert Dewar
1994-12-06  4:53                             ` Richard A. O'Keefe
1994-12-07  0:46                               ` Robin Vowels
1994-12-07  0:49                               ` Robin Vowels
1994-12-05  0:03                           ` Matt Kennel
1994-12-05 22:59                             ` Robert Dewar
1994-12-06  2:51                               ` Michael Feldman
1994-12-07  5:46                                 ` Kenneth Almquist
1994-12-08  4:11                                 ` Robert Dewar
1994-12-03 21:09                       ` Paige Vinall
1994-12-06  7:16                         ` Richard Riehle
1994-12-07 17:46                           ` David Kehs
1994-12-08 10:48                           ` Robert Dewar
1994-12-07 18:23                   ` Bob Dalgleish
1994-11-30  9:51             ` Andre Spiegel
1994-11-30 22:19               ` greg harvey
1994-11-30 23:08               ` Michael Feldman
1994-11-15  4:15   ` Brian J. Zimbelman
1994-11-15  9:40     ` David Emery
1994-11-15 16:17       ` Martijn Dekker
1994-11-17 20:39         ` Doug Robertson
1994-11-18  4:54           ` Scott McLoughlin
1994-11-18  9:12             ` Peter Hermann
1994-11-18 20:43           ` Hugh Miles
1994-11-22  8:36             ` Paul Johnson
1994-11-23 22:16           ` Gerrit Thomson
1994-11-24  1:23             ` Todd Dunnavant
1994-11-26 16:49               ` Jules
1994-11-30 15:27                 ` John Goodsen
1994-11-21 19:12       ` Jules
1994-11-23 17:25         ` Gary McKee
1994-11-25 14:16           ` Jules
1994-12-30 18:20       ` gjong
1994-11-15 11:55     ` David Weller
1994-11-15 14:34       ` Steven Whatley
1994-11-15 16:06         ` David Weller
1994-11-16 17:51           ` Tony Langdon
1994-11-17  5:04         ` Carlos Perez
1994-11-15 20:39       ` Brian J. Zimbelman
1994-11-16  4:58       ` Dan Thies
1994-11-16 18:21         ` Pete Gontier
1994-11-17 16:54           ` Dirk Broer
1994-11-15 15:56     ` Erland Sommarskog
1994-11-16 17:32       ` James A. Krzyzanowski
1994-11-16 23:04         ` Weiqi Gao
1994-11-19 19:07           ` Jules
1994-11-19 18:43   ` Jules
1994-11-19 19:38     ` Alistair James Robert Young
1994-11-23 15:40       ` Jules
1994-11-24 15:28         ` Alistair James Robert Young
1994-11-24 21:07           ` Brian Duff
1994-11-27 11:55           ` Andrew Dunstan
1994-11-16  5:04 ` Dan Thies
1994-11-16 13:37   ` Why don't we take this thread to Ada and c only? Michael R. Fronheiser
replies disabled

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