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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9cccf6ef6149fdaa X-Google-Attributes: gid103376,public From: "Pat Rogers" Subject: Re: Operators -> unit analysis Date: 2000/01/05 Message-ID: #1/1 X-Deja-AN: 568745497 References: <38620350.48F8FC08@gecm.com> <83u8l0$5i5$1@nnrp1.deja.com> <84rd2f$snm$1@nntp3.atl.mindspring.net> <84thof$9r3$1@nntp4.atl.mindspring.net> <387383D0.4EA02E95@earthlink.net> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Complaints-To: newsabuse@supernews.com Organization: Software Arts & Sciences X-MSMail-Priority: Normal Newsgroups: comp.lang.ada Date: 2000-01-05T00:00:00+00:00 List-Id: Charles Hixson wrote in message news:387383D0.4EA02E95@earthlink.net... > And some good way to handle units. So that we could safely say things like: > > speed := 37.miles / 1.5.hours; > I'm not too pleased with the syntax, but the idea is there. Computer > languages should make unit analysis easy! This is one of the "promises" of > abstract data types, but I don't feel that it's been truly fulfilled, > largely because it's too difficult to use. Syntax is part of the problem, > and standard libraries are another part (or perhaps that one's been solved, > and I just don't know). But standard types should be defined for all the > standard metric units, and most of the more common English units, with > conversion functions between them. I guess that the standard example > package, Rational, is a good example of how it could be done, but there is > lots of detail work, and it needs to be standardized. I have a facility somewhat like that on the "free code page" at my web site: http://www.classwide.com/products/freecode.htm Look for the "dimensioned units" section (at the bottom). -- Pat Rogers Training and Consulting in: http://www.classwide.com Deadline Schedulability Analysis progers@classwide.com Software Fault Tolerance (281)648-3165 Real-Time/OO Languages