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-17 05:46:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!skynet.be!skynet.be!feed.news.nacamar.de!rz.uni-karlsruhe.de!news.rz.uni-karlsruhe.de!not-for-mail From: Thomas.Koenig@online.de (Thomas Koenig) Newsgroups: comp.lang.ada Subject: Re: Dimensionality Checking (Ada 20XX) Date: 17 Dec 2001 14:46:03 +0100 Organization: University of Karlsruhe, Germany Message-ID: <9vksur$4jm$1@mvme66.ciw.uni-karlsruhe.de> References: <3c1dd328.10829203@News.CIS.DFN.DE> NNTP-Posting-Host: mvmap66.ciw.uni-karlsruhe.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.rz.uni-karlsruhe.de 1008596764 19089 129.13.201.66 X-Complaints-To: usenet@rz.uni-karlsruhe.de Xref: archiver1.google.com comp.lang.ada:18000 Date: 2001-12-17T14:46:03+01:00 List-Id: Dmitry A. Kazakov wrote: >2. Scaled units like Celsius require additional fields which cannot be >made discriminants because the offset is not of a discrete type and an >access type would make the whole type limited. This is a small problem, limited to temperature, which can be handled by conversion functions. (Yes, there's enthalpy, but if you use enthalpy values with different reference states in the same program, you're in DEEP trouble already). >3. There are still difficulties with different unit systems. One >cannot calculate everything in SI because of precission losses by >conversions (ft vs. m) The foot is defined in terms of meters already (an inch is exactly 2.54 mm). Also, the conversion factors are well-defined, and the precision loss is in the range of dividing, anyway. >and range problems (eV vs. J). One could >relatively easily produce another unit system (as you said, with >generics), but then there would be no predefined cross conversions >between it and SI. The best way to overcome the range problem would be by defining new units with respect to the SI system.