(j3.2006) (SC22WG5.5038) Decision on Units TS proposal
Tobias Burnus
burnus
Thu Jul 25 04:11:07 EDT 2013
Van Snyder wrote:
> As you might guess, my sponsors were disappointed that the proposal for a TS concerning units of measure in Fortran did not go forward. The are curious to know the reasons for opposition to a project with a
> schedule independent from the standard.
Personally, I have a mixed feeling about units: On one hand they are
neat. They provide some cross checking, the conversion functions can be
helpful and - especially for testing outputting the unit with I/O and
the conversions are useful. On the other hand, implementing all the
features suggested in N1970 will be a very large effort for compiler
implementers - and I fear that it will also divert the attention of the
committee from more pressing issues. Weighting the pros and cons, my
vote is a weak "no".
I assume that others have similar feelings about this feature - hence,
the opposition to the proposal.
Tobias
PS: You wrote in N1970 that "Incorrect use of physical units is the
third most common error in scientific or engineering software". I wonder
where the numbers come from and what are first two. With the software I
had to do with, "<" instead of ">", missing terms, wrong signs and
similar issues seem to play a much larger role than units. - More common
than those are of course out of bounds, uninitialized variables and
other such problems.
PPS: At least two of the codes I used, have internally atomic units
(hbar = 1, electron charge = 1, Bohr radius = 1, electron mass =1. As
alpha has to remain at ~1/137 [unitless!], the speed of light c =
1/alpha; energy and time are measure in units of 1). Given that most
expressions are done unitless (conversion factor is 1), I wonder whether
the programmers would move to your proposed units feature in those
codes, if it were available.
More information about the J3
mailing list