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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cc4f25d878383cc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-02 14:36:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn4feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc06-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3C0AACCE.329CFB60@worldnet.att.net> From: James Rogers X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Another Idea for Ada 20XX References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sun, 02 Dec 2001 22:36:05 GMT NNTP-Posting-Host: 12.86.36.145 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc06-news.ops.worldnet.att.net 1007332565 12.86.36.145 (Sun, 02 Dec 2001 22:36:05 GMT) NNTP-Posting-Date: Sun, 02 Dec 2001 22:36:05 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:17318 Date: 2001-12-02T22:36:05+00:00 List-Id: Gautier Write-only-address wrote: > > >From: James Rogers > > >In scientific terms a measurement is done in terms of some unit. > >For instance, distance is in meters, microns, feet or furlongs. > ... > >calculations. Because of the added computational overhead, there must > >be a way to choose or reject unit analysis for defined types. > > The overhead is not only computational, I fear: if programmers > are forced to specify the unit of each of their variables > with a possible physical meaning, they just won't program in > Ada... > > Where is the problem, indeed ? Mixing feets and meters in a > program ? This is more a political or cultural problem, I > wouldn't wish to complicate Ada with it... The problem is not only political and cultural. Take the situation of the NASA Mars probe that crashed because of an improper mixture of British and Metric distance units. If the programming language used had provided the ability to perform unit analysis the mistake would have been caught by the compiler. What I am trying to express is an extension of strong typing. This extension would allow specified mixing of types. The current Ada model places a strong barrier between all type mixes. The use of units will allow you to specify how and where certain types can be mixed. I personally find the units idea easier to understand than simply applying type coercion at various places in code. The concept of units also allows careful checking by the compiler, and secondary analysis (outside a compiler) of the code to ensure algorithmic correctness. Jim Rogers Colorado Springs, Colorado USA