| | {{infobox |
| | | title = FORTRAN |
| | | image = fortran-punch-card.jpg |
| | | caption = A FORTRAN punch card — one statement per card |
| | | released = 1957 |
| | | designer = John Backus and team |
| | | developer = [[IBM]] |
| | | paradigm = Imperative, structured (later object-oriented) |
| | | typing = Static, strong for numbers |
| | | notable_dialects = FORTRAN I–IV, FORTRAN 66/77, Fortran 90–2023 |
| | | influenced = BASIC, ALGOL, and essentially all imperative languages |
| | }} |
| | |
| | **FORTRAN** — originally *FORmula TRANslation* — is the first high-level programming language to see widespread practical use, and the oldest still in production anywhere. Released by **[[IBM]]** in **1957**, designed by **John Backus** and his team, it taught the world that a program could be written in something resembling mathematics and that a machine could do the translation. Every language since — including [[AdaLogic BASIC]] — stands on the foundation FORTRAN poured. |
| | |
| | ## Before it: the operator objection |
| | |
| | In the early 1950s, programming meant assembly: one cryptic instruction at a time, matched to a specific machine, error-prone and slow to write. The dominant belief in the field was that this could not be improved — that a machine translating human formulas into machine code would produce something so slow and bloated that no serious programmer would accept it. The objection was not entirely foolish: the first "automatic programming" systems did produce terrible code. |
| | |
| | **John Backus** — an [[IBM]] programmer who had hand-built the **Speedcoding** system for the IBM 701 — decided the objection was wrong. Not wrong in principle, but wrong in engineering: a sufficiently smart translator could generate machine code *comparable to hand-written assembly*. That was the claim FORTRAN had to prove, and it is why the name matters: FORTRAN was sold not as a new language but as a translation service. The language was the wrapper; the product was a compiler good enough that people would actually use it. |
| | |
| | [[File:ibm-704-naca.jpg|left|320px|The IBM 704 at NACA Langley (NASA, 1957) — the machine FORTRAN was built for]] |
| | |
| | ## The machine it ran on |
| | |
| | FORTRAN was designed around the **IBM 704** — the first mass-produced computer with hardware floating-point arithmetic, delivered from 1955. Its 4,096 words of core memory and 36-bit word shaped the language: the `DO` loop maps onto the 704's index registers, and the three-way arithmetic `IF` mirrors its compare instruction. NASA's predecessor NACA ran aeronautics calculations on the 704 pictured above — the exact class of work FORTRAN was built to serve. |
| | |
| | ## The language |
| | |
| | FORTRAN's first manual (1956) described a language of startling ambition for its era: |
| | |
| | ``` |
| | C A SIMPLE FORTRAN PROGRAM |
| | READ 100, A, B |
| | SUM = A + B |
| | PRINT 200, SUM |
| | 100 FORMAT (2F8.2) |
| | 200 FORMAT (F10.2) |
| | STOP |
| | END |
| | ``` |
| | |
| | Readable at a glance — `SUM = A + B` looked like mathematics because it *was* mathematics. Variables had names, expressions had operators, `DO` loops existed for iteration, and `GO TO` handled control flow. The fixed-column layout — comment in column 1, statement labels in 1–5, continuation in 6, code in 7–72 — was a fossil of the [[Punched card|punched card]] and remained FORTRAN's signature for forty years. |
| | |
| | FORTRAN I shipped in 1957 with 25 person-years of development behind it and one iconic promise in its manual: *"the FORTRAN translator will produce programs that run nearly as fast as those written by hand."* It mostly kept the promise — the compiler's optimization was genuinely clever — and the "objection" collapsed almost immediately. |
| | |
| | ## The versions that made it permanent |
| | |
| | - **FORTRAN I (1957)** — the first release; DO loops, arithmetic IF, FORMAT statements. |
| | - **FORTRAN II (1958)** — added `SUBROUTINE` and `FUNCTION` — *modular programming*, the idea that you could write a routine once and call it, is encoded here. |
| | - **FORTRAN IV (1962)** — machine-independent; the version that made FORTRAN the lingua franca of scientific computing. |
| | - **FORTRAN 77** — structured `IF/ELSE/ENDIF`, `CHARACTER` type — the standard that ran the world for a decade and a half. |
| | - **Fortran 90** (lost the all-caps) — free-form source at last, modules, dynamic arrays, array operations. |
| | - **Modern Fortran** (2003/2008/2018/2023) — object-oriented features, coarrays for parallelism, C interop — a living language, not a museum piece. |
| | |
| | ## What it is used for — still |
| | |
| | FORTRAN never went away. It remains the language of the heaviest numerical computing on Earth: |
| | |
| | - **Numerical weather prediction** — the world's forecasting models are mostly Fortran |
| | - **Physics** — climate models, nuclear simulation, quantum chemistry, particle physics |
| | - **Engineering** — structural analysis, CFD, finite-element methods |
| | - **BLAS and LAPACK** — the linear-algebra libraries underneath virtually all numerical software, including most of machine learning's foundations (NumPy calls Fortran routines), are Fortran |
| | |
| | The reason is not sentimentality: Fortran's array semantics, decades of compiler optimization, and strict numerical determinism make it the fastest language ever built for math — and seventy years of accumulated scientific code is not a codebase anyone rewrites. |
| | |
| | ## The compilers that taught compilers |
| | |
| | FORTRAN did more than introduce a language: it invented **compiler optimization** as a discipline. The Backus team's optimizer — register allocation, common subexpression elimination, strength reduction — was so sophisticated that it was decades before other compilers caught up. And **Frances Allen**, who joined the team in 1957, built the theoretical framework for program analysis that all modern optimizing compilers rest on — work that won her the **Turing Award in 2006**, the first woman to receive it. |
| | |
| | The modern implementations carry that inheritance forward: **gfortran**, the Fortran front end inside [[GCC]], implements Fortran 77 through Fortran 2023 on every platform GCC touches — it is the reason Fortran never died — and **flang**, the [[LLVM]]-native front end that entered the LLVM tree in 2020, runs Fortran through the same optimizer that powers Rust and Swift. |
| | |
| | ## Legacy |
| | |
| | - It killed the "automatic programming will never work" objection permanently — after FORTRAN, the question was not whether to use a language but which one. See the [[History of Programming#The age of languages|age of languages]] it opened. |
| | - It made software **portable** in principle for the first time — a FORTRAN program could, with care, run on machines from different vendors, an idea that had not existed before. |
| | - It named things we still use: the term "**compiler**" stabilized around FORTRAN, and its conventions (variables, loops, libraries, comments) are the generic vocabulary of all programming. |
| | - Sixty-nine years old and shipping in production, on every continent, every day — no other language can claim that. |
| | |
| | ## See also |
| | |
| | - [[IBM]] |
| | - [[LISP]] — the other founding language, built for a different question |
| | - [[ALGOL]] — the structured-language answer |
| | - [[History of Programming]] |
| | - [[Compilers]] — the toolchains FORTRAN taught to optimize |
| | - [[Ada Lovelace]] |
| | - [[Punched card]] |
| | - [[AdaLogic BASIC]] |
| + | - [[Scientific notation]] — FORTRAN’s E and D exponents made it typeable |
| | |
| | ## References |
| | |
| | 1. Backus, John, et al. "The FORTRAN Automatic Coding System." *Proceedings of the Western Joint Computer Conference* (1957). |
| | 2. IBM. *Programmer's Reference Manual: The FORTRAN Automatic Coding System for the IBM 704 EDPM* (1956). |
| | 3. Sammet, Jean E. *Programming Languages: History and Fundamentals* (Prentice-Hall, 1969). |
| | |
| | [[Category:History]] |
| | [[Category:Languages]] |
| | |