[Beowulf] Fortran is Awesome

Robert G. Brown rgb at phy.duke.edu
Wed Nov 28 09:15:05 PST 2018


On Wed, 28 Nov 2018, Peter St. John wrote:

> Maybe I'm being too serious but in the old days, Fortran was the most
> mature, maintained compiler and the libraries were great, then later, C had
> better compilers but the libraries were still great. Now, I think the only
> good thing about Fortran is that it's pretty easy to learn?

Or arguably, that it is slightly better at doing certain matrix
operations because of its default packing of matrix structures (combined
with the aforementioned good libraries and perhaps slightly better
compiler optimizations possible for code written within the usual
declaratory framework).  And the fact that there is a large base of
scientific code written in it.

But yeah, C can do anything Fortran can do, and then some.  People do
not write operating systems in Fortran for a reason.  And while the
lines have long since been blurred between the two as features of C have
been ported back to the more recent versions of Fortran, C is still the
language where you can do literally "anything" as far a data structures
go within the compiler.  Want a triangular matrix?  No problem, and no
wasted space.  Have an ODE solver that requires a vector in a problem
that is expressed as contractions of third rank tensors?  Map a vector
holding the memory to a suitably constructed and filled set of pointers
to make third rank tensor and you can evaluate your derivatives with the
tensor forms in natural langage while solving them as a vector.
Finally, when C alone isn't sufficient, you can inline assembler into C
to access things like unique hardware devices in subroutines without
waiting for somebody to give you a library or write kernel drivers for
it.

Yes, C is dangerous.  You can break your code in ever so many ways if
you code with less than discipline and knowledge and great care.  But
with great power comes with great responsibility -- as they say.  C is
IMO still the most powerful language for general purpose programming,
and the one language you'd want to be expert in if you could only be
expert in one language.  It is at least the equal of Fortran in
numerical programming, but Fortran is not at all its equal everywhere
else.

    rgb (Damn, what am I doing here -- I'll get sucked into this list
again and there goes all of my time playing fallout3...)

> Peter
> 
> On Wed, Nov 28, 2018 at 11:30 AM Stu Midgley <sdm900 at gmail.com> wrote:
>       I agree 100% .?You can't beat bash and fortran.
> 
> On Wed, Nov 28, 2018 at 9:02 AM Paul Edmon <pedmon at cfa.harvard.edu>
> wrote:
>       Fortran is and remains an awesome language.? More people
>       should use it:
>
>       https://wordsandbuttons.online/fortran_is_still_a_thing.html
>
>       -Paul Edmon-
>
>       _______________________________________________
>       Beowulf mailing list, Beowulf at beowulf.org sponsored by
>       Penguin Computing
>       To change your subscription (digest mode or unsubscribe)
>       visit http://www.beowulf.org/mailman/listinfo/beowulf
> 
> 
> 
> --
> Dr Stuart Midgley
> sdm900 at gmail.com
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org sponsored by Penguin
> Computing
> To change your subscription (digest mode or unsubscribe) visit
> http://www.beowulf.org/mailman/listinfo/beowulf
> 
> 
>

Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb at phy.duke.edu




More information about the Beowulf mailing list