My impression with newer features was often: That's nice, but I don't
need it - only to end up using it shortly later. There are many nice new
features in Fortran 2003 and 2008 which one tends to use without
realizing. For instance (F2003) strings in namelist which do not have
constant bounds, (F2008) passing internal procedures as actual argument
- or using intrinsics in initialization/constant expressions which
weren't permitted in previous versions. There are many such smaller
features - and I wouldn't be surprised if many so-called Fortran 90 or
95 programs failed to compile with -std=f95 / -stand f95 because
(accidentally) use newer features, which their compiler(s) simply accepts.
* * *
Regarding the new Fortran standard: It will contain two Technical
Specifications and otherwise:
"WG5 resolves that the next revision shall consist of a consolidation of
the agreed editorial improvements, corrigenda and the two Technical
Specifications into the main standard, plus the removal of simple
deficiencies in, and discrepancies between, existing facilities. The
intent is to resolve issues that have been created by successive
extensions to Fortran, while minimising impact on the standard document,
implementors and other users. The criterion for deciding whether a
change is simple is that it requires no more than a small amount of
editorial effort and no more than a small amount of implementation
effort. Furthermore, WG5 resolves that no new significant language
extensions, beyond those mentioned in these resolutions, will be
considered until the process described in this resolution is complete."
(N1927)
One new feature will probably be a means to influence the host
association, e.g. "IMPORT, NONE" to disable the host association; or
"IMPORT :: VAR" to only host-associated a certain variable.
The two technical specifications are:
* ISO/IEC TS 29113:2012 on Further Interoperability of Fortran with C
* And the currently being developed TS 18508 Additional Parallel
Features in Fortran, which will extend the coarray support.
The first one mainly addresses wishes from the MPI Forum (Message
Passing Interface), e.g. "TYPE(*), dimension(*) :: buffer" as equivalent
to C's "void*" or supporting Fortran-style arrays (assumed-shape,
deferred-shape, assumed-rank) from C. The latter permits passing arrays
with strides to the MPI library.
The released GCC/gfortran 4.8 already supports most of the TS29113:2012
features. And when gfortran's array descriptor is finally updated, the
new descriptor will match the one of TS29113. (The old descriptor has
several problems; e.g. in some rarely encountered case, the current
descriptor cannot represent valid Fortran 90 code.)
The TS29113 implementation was motivated in order to support the new MPI
features, which could be used with other compilers via vendor
extensions. Well, it turned out that TS29113 wasn't enough (without
using assumed-rank arrays) - hence, GCC 4.9 also add a vendor-specific
directive:
!GCC$ attributes no_arg_check :: buf
which internally uses TYPE(*) but doesn't distinguish between scalar and
dimension.
[Side remark: The next Fortran standard probably will permit to use
"type(*),dimension(*)" also with scalars - but not with other types than
type(*).]
* * *
In general, I concur that it would be useful to have a full Fortran 2008
compiler instead of having compilers which supports a lot of the new
features but not the full standard. However, I also like to be able to
use a new feature without having to wait until everything is ready and
all of a new standard is ready and enabled.
Regarding gfortran in particular: Do not forget that the development is
nearly entirely done by volunteers. Unfortunately, it seems to become
increasingly more difficult to find new contributors, while existing
contributors have increasingly less time. - Thus, if you are tempted to
contribute to the compiler or know someone who might be ...
Tobias
PS: Upcoming gfortran 4.9 features: Fortran 2003's finalization (partial
support should become available in the next weeks). The new array
descriptor might also become available in 4.9, but that's not yet
completely clear. And deferred-character length strings (as components
of derived types) could also become available, depending on the new
array descriptor. - For all those items, a lot of the work has been
done, but more is required before it can be used.
(And below the radar of release notes: Many smaller changes for newer
standards or bug fixes have and will be implemented.)
PPS: Another major GCC 4.9 feature will be the support of OpenMP 4 for
C, C++ and Fortran.