Celebrating 70 Years of Fortran (fortran-lang.org)

187 points by rbanffy 7 hours ago

EvanAnderson an hour ago

The Computer History Museum collected an oral history[0] of John Backus[1] and there's some discussion about what computing was like when Fortran was created.

I really enjoy CHM's oral histories. I'm slowly working my way thru all of them and there are some real gems in there (Ken Thompson, Dennis Ritchie, Margaret Hamilton, Gordon Moore, Fred Brooks, John Warnock, etc).

[0] https://www.youtube.com/watch?v=dDsWTyLEgbk

[1] https://en.wikipedia.org/wiki/John_Backus

obviouslynotme 3 hours ago

I used to work on software that still uses Fortran from the 50's and is still in maintenance and use today. IIRC, it had ~700kloc of Fortran. It may be the oldest and largest Fortran codebase still in use.

My first project there was removing all of the Hollerith from the code. Since Fortran predated strings, you had to manipulate them as integers. When you tied that to the original Fortran dynamic memory system, Dynosour, which used equivalenced arrays as pointers, it was a disaster.

It also gave me an appreciation for JavaBeanFactoryFactory. The original Fortran limited identifiers to six characters, the first of which indicated whether the variable was an integer, logical (bool), or real (float). I will take a 100 character name over ILBNK1 every single time.

GOTOs were surprisingly not a big problem, but structured code is definitely a bit easier to read, especially since it brought the practice of indentation with it.

Overall, it was a great experience but I wouldn't want to do it again, even if the work was interesting.

shakna an hour ago

That certainly might be one of the oldest Fortran codebases still in use I've heard of, but not quite the largest. (Character came in '77 wasn't it?)

E3SM [0] is still maintained today, and somewhere around 2mil LoC of F90.

Modern Fortran has a lot of niceties that it brings to the table.

[0] https://e3sm.atlassian.net/wiki/spaces/DOC/overview | https://github.com/E3SM-Project/E3SM

rbanffy an hour ago

> It also gave me an appreciation for JavaBeanFactoryFactory

If nothing else, short variable names create an incentive to keep functions small enough you can easily figure out what ILBNK1 means.

obviouslynotme an hour ago

You would think, but that isn't what happened at all. Half the code was very nice and readable but half was giant subroutines doing complex mathematics. The largest subroutine was over 10kloc.

The best part is that the code was originally punched onto cards, so most of the early code's comments and documentation were on paper in filing cabinets, if you could find them.

robotnikman an hour ago

>It also gave me an appreciation for JavaBeanFactoryFactory.

My favorite is SimpleBeanFactoryAwareAspectInstanceFactory

whartung 6 hours ago

FORTRAN was a very important language for me.

Growing up on early micros, with BASIC, my father had Fortran for the TRS-80.

I took a stab at learning it, but the documentation was reference for calling the compiler, not so much learning the language. And when I found a FORTRAN book, it was quite dated and talking about things like tapes and punches and what not.

So, that effort stalled.

But, my first quarter in college, I took a FORTRAN (77) class. FORTRAN taught on the schools CDC Cyber mainframe.

This was quite a change from 8-bit PET BASIC.

But, most importantly, it was exposure to much of the same concept that an 8-bit computer has, but from a different tact.

This gave me more of a way to view things from a higher level, since I had to make them fit the two different views of how FORTRAN looked at things, how the Cyber presented things, and how BASIC and the PET were "same thing only different".

It also gave me access to a multi-user system, and all of the interesting capabilities it offers.

I remember when they put in their first lab of PCs, and how they started teaching folks Turbo Pascal on micro computers, and I just felt that the users were missing out on a bigger world. "Anyone" can access a PC or micro computer at home, but mainframe or multi user mini access, not so much. It's just a much bigger world out there, and we tend to baby duck what we first see.

Different world today, never had to use FORTRAN professionally, but I am most grateful for the experience of learning it and its environment. Very powerful medium for broader learning.

Also FORTRAN was the only notable computer thing I had "taught" to me (outside of my 20 minute introduction to BASIC by my high school teacher), pretty much everything else I self learned from books and such, even knowing the bulk of it before taking classes in school.

eichin an hour ago

Heh, I used that TRS-80 (microsoft!) Fortran in high school - wrote a library for propagating error bounds and significant figures through calculations, for chemistry lab reports. (Could probably have done it in BASIC too, but I suspect I was looking for an excuse to use fortran for something :-)

rbanffy an hour ago

> I remember when they put in their first lab of PCs, and how they started teaching folks Turbo Pascal on micro computers, and I just felt that the users were missing out on a bigger world.

I believe Alan Kay used to say the right perspective is worth 80 IQ points. We should always strive to broaden our experiences and horizons. We get a ton of wrong perspectives, but one perspective you acquired will be a perfect fit for that thing nobody else has the right experiences to figure out immediately.

otterdude 5 hours ago

Fortran while historically important doesn't really seem like a good choice today.

I worked with a proprietary jet engine analysis software suite written in Fortran 77 and It felt very primitive, albeit fast.

Today I feel like C is a much better choice for speed and readability.

If you really need the fastest performance I dont think Fortran gives that much of an advantage writing assembly.

jleyank 5 hours ago

With vector machines, Fortran yielded (much) faster code because (a) there was a whole lot of work on preprocessors for "dusty deck" code and (b) the lack of pointers and their overlap let the compilers do their stuff. C code needed a lot of #pragma's to let it know that some pointers didn't overlap and so could be optimized.

We found it best to to the front-end and I/O of the code in C and the compute in Fortran. Fastest calculations especially with those tailored libraries.

crassglassass 5 hours ago

Aren't most people doing this kind of work these days engineers using matlab?

mohamedkoubaa 4 hours ago

Fortran invented array-based programming, which arguably numpy advanced and now Julia finally perfected

Athas 3 hours ago

dranudin 5 hours ago

I wrote Fortran for my first job as a software developer in 2018 for simulation solvers. Still like the language! Modern fortran is very very fast and much nicer to use than C for linear algebra. So in my opinion for numerical calculations it remains the best language, even today. Happy Birthday!

kps 2 hours ago

My second university co-op placement, which led to my first real job of 16 years, included writing a FORTRAN 77 compiler front end. It's crazy by modern standards; in some cases you have to see as far as the second-last character of a multi-line statement to determine what kind of statement it is.

hermitcrab 6 hours ago

I started off programming in FORTRAN in my first job, 40 years ago. There was a lot of terrible stuff in FORTRAN from a software engineering point of view: COMMON blocks, GOTOs, ENTRY points (to enter a subroutine part way through!), but it was one of the first high level language and language designers had a lot to learn.

kaveh808 2 hours ago

Right out of college, I wrote my first ray tracer in Fortran in the mid-80's at the Xerox Research Centre of Canada. I remember the setup being a VAX 11/750 with a RasterTech color monitor (512x512 if memory serves). [0]

My implementation was based on David Rogers' "Procedural Elements for Computer Graphics", one of only two texts available on 3D graphics, the other being Foley and VanDam.

I remember managing my own stack in a language which didn't support recursion. I learned a lot. Good times.

[0] https://medium.com/@kaveh808/8-summer-at-xerox-in-24-bit-col...

vegesm 4 hours ago

At some point I was quite interested in how the very first version of FORTRAN looked like, so I wrote a FizzBuzz [1] in it.

It was a very bare-bones language, felt more like a high-level assembly macro language. One thing it did well was expressing formulas with the usual "mathematical" notations (+,-,*,/, parentheses to group operations, variables). I guess this was revolutionary at the time. But the control structures were very limited, everything was basically jumps and gotos. The IF was merely a syntactic sugar for conditional jumps. Of course, functions did not exist in the language.

[1] https://mveg.es/posts/fizzbuzz-in-fortran-1/

jmspring 5 hours ago

An ex got me "A Fortran Coloring Book" years ago while I was working with astronomers. I was still in grad school and it gave me an excuse to learn it.

ryan_glass 7 hours ago

In the mid 90s I used Fortran to model a distillation column in a chemical engineering plant. Here I read that it is still the go to language for nuclear engineering. I am amazed but for some reason happy about this.

RetroTechie 6 hours ago

More precise:

Many years of FORTRAN. Followed by many years of Fortran.

astro1234 4 hours ago

Having written an open source Fortran library (for x ray scattering and absorption in a particular regime so this is fairly “niche” shall we say), genuinely curious: what if any advantages or strengths does Fortran have these days over other language choices? Are there circumstances where it’s arguably the “right” choice?

hatmatrix 3 hours ago

A lot of the early, absolute advantages of Fortran (numerical precision, non-aliasing) has been adopted by C.

However what still makes it a great choice is that it still a relatively simple language compared to C, and maps mathematical formulas to code very well. Inelegant code will still run reasonably fast (which is not the true with C) - so all of these points make it actually a good language when the program is being written by domain experts (i.e., scientists) rather than professional programmers or software engineers.

vintagedave 3 hours ago

May I ask: why did you write that library in Fortran? That is, what was your answer to your question at the time you wrote it?

I have heard that Fortran is very very good at optimizing array processing due to lack of aliases. That may be one answer today. There’s also value in continuity: in using a language for your task because it can build on what others have built. That applies to any established language, of course… but I could see it reasonably applied if someone wrote some kind of numerical processing library today. They’d write it in Fortran and call it from Python!

astro1234 3 hours ago

The answer was “my adviser insisted because that’s the language he used”. I had to fight to use Fortran 95 and not 77. So I think like you say value was building on an existing community’s codebase in a language they were familiar with and comfortable with.

FabHK 6 hours ago

I wanted to learn Fortran in the 1990s and borrowed a Fortran book from the university library. On the first or second page it stated "To mark comments, just punch a letter 'C' into the first column of the punch card." I returned the book and never learned Fortran.

Having said that, so many foundational libraries were implemented in Fortran (BLAS, LINPACK/EISPACK, LAPACK, MINPACK, FISHPACK, FFTPACK, etc.) - thanks for that.

PaulHoule 5 hours ago

Mainframe-era systems often used fixed-size or limited-size buffers and data structures, based on those 80-character punched cards, most addressing modes on the 360 add 12-bit immediate displacements to pointers held in registers [1] bytes and such.

It is easy to laugh but C programmers have demonstrated that they can't handle variable-sized buffers on the stack, malloc(), free() and all that.

Early versions of FORTRAN [2] didn't even have a stack, like you couldn't write recursive functions, the program would take parameters for array sizes when it boots and the memory layout would all be figured out at the beginning. When I was developing a display controller for persistence of vision displays for the AVR-8 it drove me nuts how the C compiler kept moving the stack pointer around all the time for no real reason when an assembly program could move data to and from statically allocated structures. [3]

FORTRAN and COBOL came out around the time Syntactic Structures did so of course there was not an established theory for how to parse grammars, no parser generators, etc. No Dragon Book, but the heroic techniques used to develop compilers in that age are legendary if not quite lost.

I wrote some FORTRAN programs in high school on a VAX, in a comparative programming languages class in college, converted a lot of FORTRAN algorithms into statically allocated Java in grad school in 1990 and in my postdoc I wrote a generator that wrote JNI bindings for LAPACK.

[1] ... e.g. the typical struct is < 4096 bytes

[2] before the FORTRAN 90 standard though you could set the /RECURSIVE flag on DEC FORTRAN

[3] we were done such a disservice by all those "it's so elegant to compute Fibonacci in a better programming language than BASIC" articles in Creative Computing because recursion is one of those things, like C's memory management, that most programmers can't really handle.

kps 2 hours ago

Fortran (before 90) ignored characters after column 72 because the IBM 704 had a 36-bit word and read each row of a card into two words. (The card reader could be wired with a plugboard to select any 72 of 80 columns from the card.)

cpeterso 2 hours ago

Google published a short video this week about how they used Gemini 4 Argon to migrate a Fortran code base to Rust: https://www.youtube.com/watch?v=biOWEPYyS5c

jibalt 6 hours ago

I learned programming in FORTRAN II on an IBM 1620 in 1965.

MaysonL an hour ago

I’m still amazed that the first dozen programs I ever wrote back in 1963 for an IBM 7090 (or 7094) ran first time. (They were trivial programs). I’m also still pissed that I never got to debug the 13th, in FAP (Fortran Assembly Program), which had a minor syntax error – a comma instead of a period, or vice versa. NASA had just launched a weather satellite, which monopolized computer time, leaving zero minutes for high school students.

wglb an hour ago

I started in 1966 with Fortran II on CDC 3500. Later I spent quality time on the IBM 1800 which has the same instruction set as the 1620.

mcswell 2 hours ago

Nuts, I was going to post that FORTRAN (IV) was my first programming language, but that was in 1969. So you have me beat!

hotelsacher 7 hours ago

Happy birthday! I think this has to be the oldest programming language still in use. 70 years is quite an eternity in the sphere of computing. Before Fortran, there was (almost?) nothing but assembler and plug board connectors.

jibalt 6 hours ago

https://www.guinnessworldrecords.com/world-records/397792-ol...

It beats LISP by a year and COBOL by two years.

leoc 4 hours ago

And Fortran doesn’t just predate Lisp, it’s a direct ancestor. McCarthy was talking about LISP as a FORTRAN extension for quite a while during LISP’s development. The original Fortran is effectively LISP 0.

BeetleB 6 hours ago

Have people moved on from Fortran 77?

It was frustrating that, 30 years after Fortran 77, professors were insisting in writing in that dialect. Thank God I escaped that hell.

Edit: Since people don't understand my point - I'm well aware of the existence of newer Fortran standards. But in much of academia, the professors insisted on sticking with Fortran 77.

btrettel 3 minutes ago

Your experience is not universal.

I used modern Fortran in undergrad and grad research from 2011 to about 2015. I rarely ever encountered FORTRAN 77 back then, and never had to write any. I worked as an intern at NIST and LANL during that time too and it was modern Fortran there as well. At NIST, as far as I'm aware, that group had been using modern Fortran for probably a decade or more before I started in 2011.

I didn't have to write any FORTRAN 77 until 2025 in my current job when I was given a legacy code to work with.

sampo an hour ago

> Have people moved on from Fortran 77?

Apparently not. Fortran 90 standard was published 35 years ago, in 1991. But a majority of comments in this thread are about FORTRAN 77. It's like the last 35 years didn't happen at all.

jibalt 5 hours ago

After Fortran 77 came Fortran 90, Fortran 95, Fortran 2003, Fortran 2008, Fortran 2018, and Fortran 2023.

BeetleB 5 hours ago

I'm well aware of it. And as late as 2007, I was forbidden from writing those dialects. Professors wanted everything in Fortran 77.

wglb an hour ago

dranudin 5 hours ago

Yes. With Fortran 90 most of the real archaic stuff was already gone. And they keep publishing new standards.

jleyank 5 hours ago

There was a CS literature joke that I saw back in 1982. "Whatever language is used to program high-performance machines, it will be called Fortran.".

jandrewrogers 6 hours ago

FORTRAN is also the origin of using 'i', 'j', 'k', etc as loop variables in code, since 'i' was the first variable name that could be used for that purpose. The original language design was constrained by very primitive computers.

throw-the-towel 6 hours ago

i has been the default variable for sum notation in mathematics long before FORTRAN. Here's an example dating from 1838: https://www.numdam.org/item/JMPA_1838_1_3__508_0.pdf

fph an hour ago

It might actually be the other way round: Fortran adopted the convention that i,j,k are integer variables because that was the standard in maths.

vintagedave 3 hours ago

Where in that doc, sorry? I thought I spotted something then realized it may have been a ‘1’.

tyromaniac 6 hours ago

Is that really true, if so, what's your basis? Fourier used i for the same purpose, and it definitely became a pretty standard indexing variable long before the 1950s. Most early code written in FORTRAN was essentially just transcribing formulae and algorithms that already would use such variable names.

jibalt 5 hours ago

The original language design was constrained by primitive thinking and lack of experience. The nature of computers in 1957 had no bearing on such things as variable names starting with I-N being implicitly integers ... that followed existing mathematical practice.

jleyank 5 hours ago

"that followed existing mathematical practice". Not what I would call primitive thinking. It set out to handle math quickly and it succeeded. I/O wasn't its strength, and I'm sure the latest versions look like verbose C.

whartung 6 hours ago

The reason 'i' was the first letter available was because by default identifiers starting with, I think, I-N were integers instead of float.

When I first started, with BASIC, my variable of choice was T simply because it was easy to type NEXT T in the FOR loops (why not R? I dunno...T just stuck).

kps 3 hours ago

Other way around. I–N were integers rather than float because mathematics convention uses i, j, … as indices and n, m as sizes or counts.

eichin an hour ago

392 3 hours ago

origins are very relative, it seems to have [started a bit before](https://stats.stackexchange.com/questions/176965/what-do-i-a...) :D

scott_meyer 3 hours ago

Learn FORTRAN once, understand the C/C++/... linkage model forever.

novaplan2026 an hour ago

still blows my mind that half the python data science stack is basically just a wrapper around 40 year old fortran code.

lproven 38 minutes ago

I've read that, but I tried to find some examples and couldn't.

Kuyawa 4 hours ago

I learned Fortran 77 in 1988, oh weird memories

After learning Pascal I thought fortran was definitely strange and moved on, never to touch it again

richardantj 6 hours ago

It's 30 years since I last used Fortran to pass my Civil & Structural Bachelor's and Masters. Loved the simplicity of it, modelling spring stiffness in concrete and steel piles hammers into the ground and tie rods being pulled out of their grout anchors. However, what blows my mind is that something I did on a 386/ 486 as a 3-6 month research degree is now modelled by AI and run on my desktop in minutes.

brcmthrowaway 6 hours ago

Well, what happened with your degree? Do you use it?

Frone125 7 hours ago

It's crazy to think that any programming language is that old.

jibalt 6 hours ago

I don't see why. LISP is just a year younger and COBOL is 2 years younger. And Algol, spawned a year after FORTRAN, is no longer used as such (although there is now GCC support for Algol 68) but spawned many "Algol-like" languages, including most of the languages used today ... and even modern Fortran can be considered "Algol-like", having evolved to include its block structure.

FWIW, I started programming in 1965, in FORTRAN II.

iberator 2 hours ago

Pascal and ADA are the direct successor of Algol 60(forgot the year of the first simpler dialect) and 68.

Algol, Pascal, Oberon, Simula, ADA, Julia (afik)

lloda 2 hours ago

Modern Fortran is very different from early Fortran. If it wasn't for the name you wouldn't think they're the same language.

tasty_freeze 6 hours ago

As someone who has been programming for nearly 50 years of it, it seems less remarkable.

hermitcrab 7 hours ago

"A good FORTRAN programmer can write FORTRAN in any language"

kps 2 hours ago

We're all stuck writing COBOL now.

“I used to be a mathematics professor. At that time I found there were a certain number of students who could not learn mathematics. I then was charged with the job of making it easy for businessmen to use our computers. I found it was not a question of whether they could learn mathematics or not, but whether they would. […] They said, 'Throw those symbols out—I do not know what they mean, I have not time to learn symbols.' I suggest a reply to those who would like data processing people to use mathematical symbols that they make the first attempt to teach those symbols to vice-presidents or a colonel or admiral. I assure you that I tried it.” — Grace Hopper

0bytes 6 hours ago

It’s not Fortran style, but the code of the original Bourne shell is a remarkable piece. “How to write Algol in C”

goatlover 6 hours ago

"Real Programmers Don't Use PASCAL": https://homepages.inf.ed.ac.uk/rni/papers/realprg.html

dzonga 2 hours ago

Rust is the fortran of its age.

the real test will be on the longevity side.

WalterBright 5 hours ago

I abandoned FORTRAN for good when I discovered C.

shaohua 6 hours ago

Thank you,Fortran!

waynecochran 5 hours ago

FORTRAN 77 was the language for the first programming language course I took. I absolutely hated computers and programming after that course. Later I took CS courses and used Pascal -- one day the concept of abstraction hit me as we were developing data structs in the 2nd semester and the light went on. That is when I first started to love programming. FORTRAN was thereafter referred to as the F language. Sorry to be a bummer, but I still recoil when I hear about that language.

buddyholey 5 hours ago

I worked on BLAS. Amazing language and tremendous impact it's had over the decades.

insanetake 4 hours ago

"I don’t know what the scientific language of the year 2050 will look like, but I know it will be called Fortran."

fortran77 4 hours ago

Horray! I'm partial, of course, to Fortran 77 and until very recently, still used it. Mostly taking consulting jobs moving it to Matlab or Numpy and verifying it.

jmclnx 7 hours ago

My first language, I should try and mess with it again. It has been decades since I used it.

hermitcrab 6 hours ago

I believe it has changed quite a lot, keeping its focus for scientific/engineering computing, but adapting more modern language constructs. I'm not sure how much of the archaic stuff (COMMON blocks, ENTRY points etc) is supported in the more recent standards for backward compatibility.

jleyank 5 hours ago

Aren't COMMON's implemented as static structures? Stuff that's accessible from multiple functions - except that Fortran requires explicit rather than implicit reference.

hermitcrab 5 hours ago