Skip to content

Hello Friend, Let‘s Explore the Evolution of Fortran

From the early days of computing, programmers have created programming languages to write software more efficiently. One of the most influential languages that emerged in the 1950s was Fortran. In this article, we‘ll explore the fascinating history and continual evolution of Fortran over the past six decades.

The Challenging Early Days of Programming

To understand Fortran‘s origin, we need to go back to the 1950s when computers relied on manual programming using cryptic machine code and assembly language. In those early days, programming was an extremely tedious and error-prone process even for basic tasks. According to IBM records, a typical project could require programmers to write hundreds of thousands of lines of raw machine code!

In 1953, an IBM mathematician named John Backus started thinking about how to make programming easier for scientists. He gathered a team and began working on a new language called Formula Translation or Fortran for short.

The key goals Backus laid out for Fortran were:

  • Allow equations to be written in algebraic notation
  • Automatically convert formulas into efficient machine code
  • Substantially reduce the burden of programming in assembly language

After nearly 300 person-years of effort, the first Fortran compiler was completed in 1957. Although limited initially, Fortran proved high-level languages were possible and offered a major productivity boost. IBM provided the compiler for its mainframe computers at no charge, fueling rapid adoption.

Let‘s look at how Fortran continued to evolve with new versions over the decades that followed.

FORTRAN I (1957) – A Promising Beginning

The first version of Fortran, called FORTRAN I, was released for the IBM 704 computer in 1957. Over the next two years, about 40 different Fortran compilers were created for computers from IBM, CDC, UNIVAC, and others.

FORTRAN I introduced several groundbreaking ideas:

  • Math formulas could be written using familiar algebraic notation
  • Simple variable types like real and integer
  • Arithmetic operations for formulas (+, -, *, /)
  • Control flow with IF statements and loops
  • Built-in trigonometric and log functions (SIN, COS, EXP)
  • Reusable blocks of code called subroutines

Although limited to numeric calculations, FORTRAN I increased programmer productivity significantly. One study by IBM found it was about 5X faster to program in FORTRAN compared to assembly language.

By 1960, an estimated 200 programmers were actively using FORTRAN, mostly for scientific and engineering problems. The applications included weather prediction, aircraft design, and nuclear energy research.

FORTRAN II (1958) – Refining the Base

While FORTRAN I gained popularity in technical fields, the IBM team received feedback on how to improve the language. In 1958, they released FORTRAN II which added several important refinements:

  • Subprograms – reusable functions and subroutines
  • Typed variables – REAL, DOUBLE, COMPLEX, LOGICAL
  • Symbolic constants like PI
  • COMMON blocks to share variables between subprograms

These improvements helped organize programs into modular subprograms and expanded the language‘s capabilities. For example, engineers could now write FORTRAN code to control machinery and perform business tasks.

By 1963, there were over 40 Fortran compilers for different computers. Fortran remained central to scientific programming through the 1960s. Many projects combined Fortran with assembly language when needed.

FORTRAN IV (1962) – Major Milestone

In the early 1960s, computer technology was advancing rapidly with new mainframes like the IBM 7090. To utilize these new hardware capabilities, IBM developed a major upgrade called FORTRAN IV released in 1962.

FORTRAN IV introduced several important capabilities:

  • Free-form source input instead of fixed columns
  • Logical data type for Boolean tests
  • Arrays to represent sets of numeric data
  • DO loops for iterative processing
  • IF/THEN/ELSE constructs for conditional logic
  • Built-in READ/WRITE operations for data I/O
  • Only 5 column restrictions on source code

These changes enabled Fortran programmers to write far more sophisticated programs. Loops, conditional logic, I/O, and data structures were basic elements needed for larger-scale applications.

According to a 1965 survey, over 40% of IBM 7090 computers ran engineering and scientific applications coded in FORTRAN IV. It became indispensable for fields like physics, chemistry, aerospace, weather prediction, and more.

FORTRAN 66 (1966) – Industry Standard

In the mid-1960s, concerns grew over compatibility between Fortran on different platforms. Vendors added their own custom extensions to the language, causing portability issues.

To address this, the American Standards Association (now ANSI), worked with major hardware vendors to define a standard Fortran specification in 1966. This was known as FORTRAN 66 and became the first industry standard version.

FORTRAN 66 standardized key parts of the language syntax, semantics, built-in libraries, and I/O system. This enabled Fortran code portability across various machines. However, vendors could still add proprietary extensions if needed.

The standardization enabled Fortran to consolidate its dominance in scientific computing for decades to come. It also paved the way for future standards.

FORTRAN 77 (1977) – Playing Catch Up

Through the 1970s, newer languages like Pascal and C were growing rapidly and supporting more modern features. In response, ANSI published a major update to Fortran known as FORTRAN 77 in 1977.

Some highlights of FORTRAN 77 were:

  • Structured programming concepts
  • Dynamic memory allocation
  • ENTRY statement for multiple entry points
  • Recursive subprograms
  • Standard data types like INTEGER, REAL
  • Portable system interface for I/O and OS calls

These improvements helped bring Fortran up to par with other languages of the time. Debugging existing code was easier with structured programming. Dynamic allocation and recursion enabled more complex applications.

Most Fortran 66 code could be automatically converted to FORTRAN 77. This helped extend the lifetime of legacy Fortran programs.

Fortran 90 (1991) – Modernization

In 1991, Fortran took a major evolutionary step with Fortran 90. Some highlights:

  • Free-form code formatting
  • New data types – strings, pointers, user-defined types
  • Module construct for separate compilation
  • Dynamic memory allocation
  • Whole array operations
  • Pure and elemental procedures
  • Recursive I/O

These changes modernized Fortran and made it more competitive with languages like C++ and Java. Free-form source enabled better program organization. User-defined types and dynamic allocation improved data abstraction capabilities.

The module system also allowed grouping procedures and data together for easier large-scale programming. This helped pave the way for more object-oriented features in future versions.

Adoption of Fortran 90 was relatively slow at first. However, key scientific computing software like LAPACK and FFTW were some of the early adopters.

Fortran 95/2003/2008 – Gradual Enhancements

After the major changes in Fortran 90, subsequent versions focused on gradual enhancements:

  • Fortran 95 – minor update, added new intrinsic procedures and parallel processing features
  • Fortran 2003 – major update, object-oriented programming, C interoperability, IEEE floating-point
  • Fortran 2008 – minor update, coarrays for parallel computing, submodules, more intrinsics

These iterative versions helped incorporate modern programming concepts into Fortran without disruption. Each version remained almost completely compatible with prior versions.

New object-oriented capabilities made Fortran more competitive for large-scale programming. Interoperability with C enabled linking Fortran libraries in HPC applications.

Fortran 2015/2018 – Tomorrow‘s Code, Yesterday’s Language

The latest versions continue to extend Fortran‘s capabilities:

  • Fortran 2015 – interoperability with C arrays, parameter intents, Unicode strings
  • Fortran 2018 – coarray teams, event handling, predefined derived types

These changes expand support for parallel computing and linking with other language libraries. Numeric capabilities were also improved with higher precision types like REAL128.

Remarkably, code written in the very first FORTRAN versions from the 1950s can still compile and run today with a modern Fortran compiler! This reliable backward compatibility along with gradual evolution has helped cement Fortran‘s place in high-performance scientific computing.

The Enduring Popularity of Fortran

So why does Fortran remain so popular after 60+ years of newer languages? A few key reasons:

  • Huge amount of legacy code and libraries
  • Mature compiler implementations
  • Suitable for math and HPC applications
  • Gradually evolved capabilities
  • Stability and portability of code over decades

Rather than compete with more modern languages, Fortran chose to specialize on numerical and scientific computing. This focus, along with backward compatibility, ensured adoption at universities, research labs, and weather services.

According to the TIOBE index, Fortran has remained in the top 20 programming languages for the past 20 years. It reached a peak ranking of #9 in November 2021.

The mission-critical nature of domains like aerospace, physics, and meteorology has helped cement Fortran‘s role. When there are lives and billions of dollars on the line, stability and reliability are key.

The Next Fortran Frontier

Where might Fortran go in the future? The standards committee continues to meet to steer Fortran‘s evolution. Some possibilities on the horizon:

  • Expanded object-oriented programming constructs
  • Increased parallel processing capabilities
  • Tighter integration with Python and other languages
  • Abstract machine model for enhanced portability
  • Built-in package manager

By building on decades of existing code with gradual improvements, Fortran seems poised to innovate for another 60 years. The history of Fortran shows that with careful stewardship, a programming language can continue to stay relevant.

So next time you hear about the latest hyped language, remember that old languages like Fortran are still getting the job done behind the scenes! The foundation built over decades provides a stability that some newer languages may lack.

I hope you enjoyed exploring the history and continued evolution of one of the most successful programming languages – Fortran! Let me know if you have any other tech history topics you would like covered.