I responded in another message with links to the Fortran 90 and 95 compilers on OS X: IBM, Absoft (F90), NAG, and g95. Googling "mac os x Fortran 95" gives relevant links. G95 is free on all platforms.
It's true that most Fortran code in existence today is in F77 or an earlier version, but I can write new code in Fortran 95 and call old code in F77 without any problem.
If future generations of programmers are too lazy or inflexible to learn anything besides C, that's their problem.
Besides gfortran, which is part of GCC, there is also the free g95, with compiler binaries for Mac OS X, Linux, and Windows -- see http://www.g95.org/ . G95 currently supports almost all of Fortran 95, unlike gfortran. Absoft sells their own Fortran 95 compiler for Mac OS X, in addition to IBM's -- see http://www.absoft.com/ . NAG has also has an F95 compiler -- see http://lists.apple.com/archives/scitech/2002/Jul/m sg00076.html .
Your knowledge of Fortran is based on the outdated Fortran 77 standard. Since then, there have been three standards, Fortran 90, 95, and recently 2003. Please consult a Fortran tutorial at http://www.dmoz.org/Computers/Programming/Language s/Fortran/Tutorials/Fortran_90_and_95/ before spreading misinformation in the future. About ten Fortran 95 compilers exist -- see http://www.dmoz.org/Computers/Programming/Language s/Fortran/Compilers/.
To answer your specific assertions: Fortran and most other languages have goto, but since it now has a full set of control structures, they are rarely needed. In F90 variables have names up to 31 characters long.
Fortran I/O is SUPERIOR to what I've seen in other languages. You can read or write a vector of integers and reals with just
Modern versions of Basic, such as Visual Basic, fully support structured programming and are more readable and safer than obscure, error-prone languages like C.
With
valarray x(2*3*4);
you have a 1D array -- you can't refer to the last element as x[1][2][3]. In Fortran, after allocating 3D array x(2,3,4) you can refer to element x(2,3,4) or to slices such as x(2,2:3,:). Fortran has natively supported multidimensional arrays for 50 years. C and C++ natively have only the 1-D array, awkwardly constructing multdimensional arrays from arrays of arrays.
Since the 1990 standard it's spelled "Fortran". I've noticed that people who misspell it often have little knowledge of it.
In their handling of arrays, C and C++ are closer to assembly language than Fortran. Allocating a 3-D array in Fortran is done with just
real, allocatable:: x(:,:,:) allocate(x(2,3,4))
In C/C++ you declare a pointer to a pointer to a pointer -- talk about ugly!
Fortran 90/95 pointers are less powerful (and dangerous) than those of C/C++ but are still useful. Often I find myself referring repeatedly to an array section. Using a pointer I can refer to this section more concisely.
I don't know about the politics of the unfortunate g95/gfortran split, but I can say that Andy Vaught, the force behind g95, works very hard at it, adding features (including a few from Fortran 2003) and fixing bugs at a fast pace. G95 compiles many large codes as well as my (smaller) codes. Binaries are available for 7 Unix/Linux platforms from http://www.g95.org .
I am a quant who uses Fortran 95 for the things you mentioned -- it has built-in multidimensional arrays, including arrays with complex elements and operator overloading, and it's cross-platform if you write standard Fortran 95 and have compilers for needed platforms. You can compile code to DLLs for use in Excel etc.
There is enough interest in Fortran to support about 10 Fortran 95 compiler vendors -- see http://www.dmoz.org/Computers/Programming/Language s/Fortran/Compilers/ . You can see in the comp.lang.fortran newsgroup that people ARE using it to write new code, using the new features of Fortran 90 and 95. Fortran is still the best compiled language for numerical work -- compare its handling of arrays with that of C or C++.
I responded in another message with links to the Fortran 90 and 95 compilers on OS X: IBM, Absoft (F90), NAG, and g95. Googling "mac os x Fortran 95" gives relevant links. G95 is free on all platforms. It's true that most Fortran code in existence today is in F77 or an earlier version, but I can write new code in Fortran 95 and call old code in F77 without any problem. If future generations of programmers are too lazy or inflexible to learn anything besides C, that's their problem.
Besides gfortran, which is part of GCC, there is also the free g95, with compiler binaries for Mac OS X, Linux, and Windows -- see http://www.g95.org/ . G95 currently supports almost all of Fortran 95, unlike gfortran. Absoft sells their own Fortran 95 compiler for Mac OS X, in addition to IBM's -- see http://www.absoft.com/ . NAG has also has an F95 compiler -- see http://lists.apple.com/archives/scitech/2002/Jul/m sg00076.html .
Your knowledge of Fortran is based on the outdated Fortran 77 standard. Since then, there have been three standards, Fortran 90, 95, and recently 2003. Please consult a Fortran tutorial at http://www.dmoz.org/Computers/Programming/Language s/Fortran/Tutorials/Fortran_90_and_95/ before spreading misinformation in the future. About ten Fortran 95 compilers exist -- see http://www.dmoz.org/Computers/Programming/Language s/Fortran/Compilers/ .
To answer your specific assertions: Fortran and most other languages have goto, but since it now has a full set of control structures, they are rarely needed. In F90 variables have names up to 31 characters long.
Fortran I/O is SUPERIOR to what I've seen in other languages. You can read or write a vector of integers and reals with just
read (*,*) ivec(1:4),xvec(1:10)
write (*,"(4i6,10f10.4)") ivec(1:4),xvec(1:10)
It would take multiple loops to do this in Java, C, or C++.
You can think of modern Fortran as a fast, compiled, ISO-standardized Matlab (it has array operations).
Modern versions of Basic, such as Visual Basic, fully support structured programming and are more readable and safer than obscure, error-prone languages like C.
With valarray x(2*3*4); you have a 1D array -- you can't refer to the last element as x[1][2][3]. In Fortran, after allocating 3D array x(2,3,4) you can refer to element x(2,3,4) or to slices such as x(2,2:3,:). Fortran has natively supported multidimensional arrays for 50 years. C and C++ natively have only the 1-D array, awkwardly constructing multdimensional arrays from arrays of arrays.
Since the 1990 standard it's spelled "Fortran". I've noticed that people who misspell it often have little knowledge of it.
:: x(:,:,:)
In their handling of arrays, C and C++ are closer to assembly language than Fortran. Allocating a 3-D array in Fortran is done with just
real, allocatable
allocate(x(2,3,4))
In C/C++ you declare a pointer to a pointer to a pointer -- talk about ugly!
Fortran 90/95 pointers are less powerful (and dangerous) than those of C/C++ but are still useful. Often I find myself referring repeatedly to an array section. Using a pointer I can refer to this section more concisely.
I don't know about the politics of the unfortunate g95/gfortran split, but I can say that Andy Vaught, the force behind g95, works very hard at it, adding features (including a few from Fortran 2003) and fixing bugs at a fast pace. G95 compiles many large codes as well as my (smaller) codes. Binaries are available for 7 Unix/Linux platforms from http://www.g95.org .
I am a quant who uses Fortran 95 for the things you mentioned -- it has built-in multidimensional arrays, including arrays with complex elements and operator overloading, and it's cross-platform if you write standard Fortran 95 and have compilers for needed platforms. You can compile code to DLLs for use in Excel etc.
There is enough interest in Fortran to support about 10 Fortran 95 compiler vendors -- see http://www.dmoz.org/Computers/Programming/Language s/Fortran/Compilers/ . You can see in the comp.lang.fortran newsgroup that people ARE using it to write new code, using the new features of Fortran 90 and 95. Fortran is still the best compiled language for numerical work -- compare its handling of arrays with that of C or C++.