[J3] 18-156
Van Snyder
van.snyder
Tue Feb 27 13:12:15 EST 2018
On Tue, 2018-02-27 at 15:12 +0000, Clune, Thomas L. (GSFC-6101) wrote:
> Perhaps I?m overly naive, but the combination of generic programming
> and ?new types?, should allow a significant portion of the units
> functionality to developed in libraries.
I've already given some thought to that, as did Grant Petty. It doesn't
actually do much of the job. Grant Petty's module provided a derived
type with integer components to hold the exponents of the SI base units.
Kilometers and meters have the same exponent for length. Adding
distinction between measures adds overhead.
Camfort analyzes expressions and assignments. It tries to work out the
units of variables for which units are not declared from their
dependence on variables for which units are declared. The point of the
toy project was to give a grad student a topic for a paper, or maybe
even a thesis, about how few specifications one can get away with. It
doesn't do anything for generic resolution or unit safety at procedure
references or I/O or conversions between measures of the same base unit.
We've spent the last two revisions fixated on performance, so it seems a
bit weird to get advice to package up the arithmetic operations in
library procedures. How many days would it take to get an hour's
weather prediction using that kind of code?
More information about the J3
mailing list