4 ms·
In practice, unit checking is almost never done on actual code, though it should be done. From what I recall, some Fortran folks have been trying to get unit ch
by btrettel 1y ago
In practice, unit checking is almost never done on actual code, though it should be done. From what I recall, some Fortran folks have been trying to get unit checking into the Fortran standard itself since the 1970s without success.
I was able to coerce Fortran's type system into checking units, but it comes with quite a few downsides: https://fortran-lang.discourse.group/t/compile-time-unit-checking-in-fortran-some-practical-experiences/8488/1 https://fortran-lang.discourse.group/t/compile-time-unit-che...
An approach based on static analysis would not have the downsides I listed, but I personally would prefer being unable to compile the code at all if it had an error that could be detected.
- colechristensen 1y agoElaborate typing is what Ada was for.