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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,901cf02e3fdf0c96 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!o11g2000prd.googlegroups.com!not-for-mail From: kevin cline Newsgroups: comp.lang.ada Subject: Re: SI Units - has Ada missed the boat? Date: Wed, 18 Jul 2007 00:11:12 -0700 Organization: http://groups.google.com Message-ID: <1184742672.910297.54010@o11g2000prd.googlegroups.com> References: <1183907619.564482.240470@w3g2000hsg.googlegroups.com> NNTP-Posting-Host: 76.186.29.123 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1184742673 7963 127.0.0.1 (18 Jul 2007 07:11:13 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 18 Jul 2007 07:11:13 +0000 (UTC) In-Reply-To: <1183907619.564482.240470@w3g2000hsg.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: o11g2000prd.googlegroups.com; posting-host=76.186.29.123; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news1.google.com comp.lang.ada:16505 Date: 2007-07-18T00:11:12-07:00 List-Id: On Jul 8, 10:13 am, Martin wrote: > One of my pet hopes for Ada2005 was that it would include some method > of automatically checking systems of units at compilation time or with > minimal run-time checking. Alas it was voted down due to time > pressures and technical issues (seehttp://www.ada-auth.org/ai-files/minutes/min-0403.html#AI324 > andhttp://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00324.TXT?rev=1.3). > > C++ now has the Boost library (seehttp://svn.boost.org/trac/boost/browser/sandbox/units) > with zero-runtime cost (or at least when optimisation is switched on). A basic but usable implementation is obvious to anyone who understands C++ template metaprogramming. Of course a fully general implementation is considerably more work. > > And now Java has a proposal for a similar beast (seehttps://jsr-275.dev.java.net/files/documents/4333/34956/jsr-275.pdf). This is rather unwieldy since Java does not allow operator overloading. Who wants to read code like: time_aloft = sqrt(height.times(2).divide(g)) Nor can Java check the correctness of that computation at compile time. > > I've been playing around with the C++ Boost library and it seems quite > good - at least for the sort of things I would use it for (embedded > avionics). > > Is anyone still working on an Ada solution to this? A satisfactory solution seems impossible until Ada allows implicit generic instantiation, and then it would be relatively simple.