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-03 17:40:50 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: byhoe@users.sourceforge.net (Adrian Hoe) Newsgroups: comp.lang.ada Subject: Re: Another Idea for Ada 20XX Date: 3 Dec 2001 17:40:49 -0800 Organization: http://groups.google.com/ Message-ID: <45601fc.0112031740.3e217c8a@posting.google.com> References: <3C0AACCE.329CFB60@worldnet.att.net> NNTP-Posting-Host: 210.186.172.23 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1007430050 22837 127.0.0.1 (4 Dec 2001 01:40:50 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 4 Dec 2001 01:40:50 GMT Xref: archiver1.google.com comp.lang.ada:17368 Date: 2001-12-04T01:40:50+00:00 List-Id: James Rogers wrote in message news:<3C0AACCE.329CFB60@worldnet.att.net>... > 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 I missed the historic discussion on this matter too. Anyway, I don't see the reason to mixing unit calculation. Why not standardised the unit while designing and coding the software? It does not make good sense if an area is 25cm x 6inches and this certainly create chaos. The crash of NASA Mars probe proved the inability to communicate or to standardize among those engineers. Wouldn't this be avoided if these engineers agreed on a standardized unit of measurement? Again, will the further augmentation of Ada (adding of units conversions and checking) help to resolve this problem? I do not against the motion but question it and if James or anyone else can demonstarte the benefits of it with sample applications. This could be of great help in fMRP, the MRP software for furniture industry developed by my company. Lutz and Dmitry implementations are very interesting and may help in fMRP. Just my 2 cents from my own pocket. -- Adrian Hoe