From: kevin cline <kevin.cline@gmail.com>
Subject: Re: SI Units - has Ada missed the boat?
Date: Wed, 18 Jul 2007 00:11:12 -0700
Date: 2007-07-18T00:11:12-07:00 [thread overview]
Message-ID: <1184742672.910297.54010@o11g2000prd.googlegroups.com> (raw)
In-Reply-To: <1183907619.564482.240470@w3g2000hsg.googlegroups.com>
On Jul 8, 10:13 am, Martin <martin.do...@btopenworld.com> 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.
next prev parent reply other threads:[~2007-07-18 7:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-08 15:13 SI Units - has Ada missed the boat? Martin
2007-07-10 5:54 ` ME
2007-07-18 7:11 ` kevin cline [this message]
2007-07-18 8:17 ` Georg Bauhaus
2007-07-23 5:29 ` kevin cline
2007-07-23 18:43 ` Georg Bauhaus
2007-07-24 9:59 ` Colin Paul Gloster
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox