(j3.2006) Pointless constraints
Van Snyder
Van.Snyder
Tue Mar 10 21:31:34 EDT 2015
At meeting 206, I complained about the pointless restriction of the
proposed design of SELECT RANK to assumed-rank objects.
I've run against other examples of pointless constraints (and argument
characteristic requirements) causing trouble. These were later
recognized to be unnecessary and removed, but not everybody has caught
up to it.
For example, in F 2003, the argument to C_LOC could not be an array, and
it it was a character, it had to have length 1. These restrictions were
removed in TS 29113.
At least one compiler helpfully checks whether the 2003 requirements
were violated, and refuses to compile the module if so. This is helpful
if one wants to use that compiler to check whether code will conform, in
case I might want to use another compiler that similarly checks.
But... other compilers to which I have access either never cared, or are
further along in implementing TS 29113.
When I had some new requirements arrive, I used C_LOC with array
arguments, and character arguments, in one include file -- until I tried
to use that compiler. Retrofitting to strict F 2003 compliance took
several days, required replacing one include file with 60 others (ranks
1-15, ranks 1-15 with another argument that is a scalar replaced by one
that is an array of the same rank, and, independently, character as
opposed to non-character), and required replacing all references to that
include file with reference to one of the 60 others.
Can we please stop trying to enforce our own programming-style
preferences using constraints, or at least not by constraints that
confer no benefit of consistency or correctness, and that will
eventually (long after I retire) be recognized as pointless, and
removed?
More information about the J3
mailing list