(j3.2006) Pointless constraints

Bill Long longb
Wed Mar 11 12:07:35 EDT 2015


On Mar 10, 2015, at 8:31 PM, Van Snyder <Van.Snyder at jpl.nasa.gov> wrote:

> 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.

What?s wrong with C_LOC (Array(1)) ?

> 
> 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.

You could complain to the compiler vendors.  On the other hand, we learned from Interp f08/0128 that some vendors got burned by implementing a TS too early. 

> 
> 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.

It sounds like this code has a spectacularly bad design.   I don?t think the problem here is the standard.

Cheers,
Bill

> 
> 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?
> 
> 
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3

Bill Long                                                                       longb at cray.com
Fortran Technical Suport  &                                  voice:  651-605-9024
Bioinformatics Software Development                     fax:  651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101





More information about the J3 mailing list