(j3.2006) (SC22WG5.5759) [ukfortran] RE: RE: Units of measure

Cohen Malcolm malcolm
Thu Jul 7 21:37:27 EDT 2016

This kind of annotation is very domain-specific.  Moreover, it strikes me as 
exactly the kind of thing that is suited to directives (if there is no code 
generation why should it be in the language).  And such directives are 
exactly the thing for software tools to handle via checking (for the compile 
time requirements) and source-to-source transformation if there does need to 
be runtime execution involved.

Doing it via software tools has the significant advantages of
(a) no impact on vendor implementations,
(b) works even for compilers whose vendors have not provided it,
(c) only takes a year or two to obtain, instead of more than 10 years via 
the standard (or even more than that, seeing as how here we are in 2016 but 
few compilers yet implement all of the standard we started working on in 
1998 and published in 2004!).

There are software companies which provide software tools for Fortran.  NAG 
is such a company.  As I mentioned before, I am sure that NAG would be 
prepared to design the directives and implement tools for units handling, 
and almost certainly for less than 1% of $300M.  So far, neither I nor 
anyone else at NAG has received even a hint of interest in such a thing.

If your organization had lost $300 million due to a trivial software mistake 
that the programming language and its runtime could have caught or corrected 
automatically, would you roll over and play dead?

No, I would build, or contract to be built, a tool for checking code that is 
annotated with units information, for the reasons given above.

........................Malcolm Cohen, Nihon NAG, Tokyo. 

More information about the J3 mailing list