Poll: Naming a function in stdlib

Hardly. The world is full of varied and diverse views and one can easily draw up a lot of practical and valuable exceptions to “rules” that are more aspects to style!

What I wrote above was based on actual feedback from many engineers and scientists and the resultant practice in the teams I had worked with, albeit during the 1990s when considerable amount of new code using Fortran 90/95 was still being developed (alas so many codebases have since migrated away, a different story).

The rationale documented with the feedback was the verbs helped both the consumers and coders:

  • For the consumers, it helped distinguish the functions from multidimensional arrays in Fortran,
  • For the authors, it made the use of RESULT clause clearer in code e.g.,
   function CalcFoo( .. ) result( Foo )
       ..
1 Like