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=-0.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLYTO_END_DIGIT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,cc4f25d878383cc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-02 15:27:02 PST From: Patrick Hohmeyer Subject: Re: Another Idea for Ada 20XX Newsgroups: comp.lang.ada Reply-To: pi3_1415926536@yahoo.ca References: <3C0A5054.E74A82E7@worldnet.att.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8Bit User-Agent: KNode/0.3.2 Message-ID: <8GyO7.2671$BS1.330049@news20.bellglobal.com> Date: Sun, 2 Dec 2001 18:49:24 -0500 NNTP-Posting-Host: 65.94.190.113 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1007335172 65.94.190.113 (Sun, 02 Dec 2001 18:19:32 EST) NNTP-Posting-Date: Sun, 02 Dec 2001 18:19:32 EST Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!news1.tor.metronet.ca!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:17319 Date: 2001-12-02T18:49:24-05:00 List-Id: And Lutz Donnerhacke has spoken : > * James Rogers wrote: > >In scientific terms a measurement is done in terms of some unit. > >For instance, distance is in meters, microns, feet or furlongs. > >Speed is then calculated as a distance per unit time. Acceleration > >is the second derivative of speed. > > >Note that a lot of the unit analysis could be performed statically. > >This would allow minimal performance penalty at run time. > > http://www.iks-jena.de/mitarb/lutz/ada/units/ > > I�m going to provide automatic unit optimization. Please stay tuned. Interesting approach, but at first glance I dont see how you'll solve the Celsius = Kelvin + 273.15 problem. This solution seams only to work with units where zero in one unit equals zero in the other as well. I think an approach : type Conversion is access function(value : Accuracy) return Accuracy; type Unit_Description is record toSI : Conversion; fromSI : Conversion; -- some text ??? end record; type Quantity is tagged record value : Accuracy; Unit : Unit_Description; end record; offers more flexibility than your idea of a Dimension. -- Patrick Hohmeyer