(j3.2006) Optional parts of programming languages
Aleksandar Donev
donev1
Thu Aug 23 12:31:26 EDT 2007
Robert Corbett wrote:
> Of course, the existing Fortran standard has significant optional parts.
> All of Chapter 14 is optional.
Wrong! The functionality of it is optional, because it depends on
hardware support. But the syntax (which is trivial here because it is
just a module) must be recongnized by the compiler and processed
accordingly.
> Chapter 15 should have been optional.
Wrong again!
> As it stands, an implementor must supply a C compiler or something
> equivalent to a C compiler (see Section 2.5.10) to conform to the
> Fortran standard.
Wrong. Which part of "it may be the Fortran processor itself," is not clear?
In both cases the syntax is standardized and all compilers must
recognize it, parse it, and verify it. Other than that they need not do
anything more. BIND(C) can simply be thrown out, for example. It does
not change the meaning of a Fortran program. It merely adds some
conditions that the compiler should verify (i.e., is this interface
really interoperable).
It is exactly the same situation with co-arrays. Compilers must know the
syntax, parse it, verify it, and then they can simply throw away all
square brackets and put no ops for syncs. It is as optional as a
language feature should ever get. We are serving programmers, not
compilers. Programmers should not have to maintain two versions of their
code just because some compiler writers or Fortran teachers do not want
to do a little extra work.
Best,
Aleks
More information about the J3
mailing list