Can writing INTENT(...) declarations be a waste of time?

No, it does not. Unspecified INTENT is a YOLO thing, you promise the compiler that you will never make a mistake, and a decent compiler will take you at your word. On the other hand, you also are not giving it any hints that it can use to optimize execution. Marking a dummy as INTENT(IN) can help optimize across statements in the same way that we discussed in Quiz : So, you think you know Fortran expressions about a single statement.

If syntax is required for “unspecified INTENT”, I think INTENT(UNSPECIFIED) seems the obvious choice. It could be coupled with an IMPLICIT NONE(INTENT) which will reject code that doesn’t explicitly specify INTENT for all dummies.

2 Likes