History of Computer Languages - the classical decade, 1950s
Wednesday, 18 November 2009 11:04
Article Index
History of Computer Languages - the classical decade, 1950s
Towards a hgh level language

The birth of the compiler

In a sense a macro assembler just allows programmers to establish shorthand forms for commonly used chunks of code. But they were also important because they introduced the idea of moving away from the primitive machine code towards more powerful and sophisticated instructions that are translated into machine code. This is the fundamental idea of a compiler and it frees the design of programming languages from simply copying the underlying machine code.

Instead of using macros to extend simple assembly language, why not use the same technique to create a completely new and machine independent high level language? From our point of view this seems like an obvious and desirable next step. It means that you can produce an easy-to-use and powerful language that can be understood by any computer that has a compiler for it. But the programmers of the time had many doubts about high level languages. They were sceptical about the possibility of creating a high level language compiler at all and if it was possible they doubted it could be efficient.

Some of the reasons for these attitudes were due to emotion rather than good sense. After so many years of using machine code directly the best programmers thought about program in terms of what the machine actually did and high level languages threatened to get between the programmer and the machine.

Accepting high level languages was seen as a loss of control over the programs that were being created. A common complaint was that if a compiler was used to generate machine code then the dangerous situation would arise of no one really understanding the final code. Today of course no-one worries about the fact that no human eye ever examines the machine code of the major applications programs. But in those days machine code was the language that most programmers thought in!

 

Fortran proves it's possible

The only way to prove that an efficient compiler could be produced was actually to produce one, but this brings us to the central difficulty of early compiler construction - arithmetic expressions. If it wasn't for arithmetic expressions the transition from macro assemblers to compilers would have been trivial.

The problem with an arithmetic expression is that the order in which things have to happen isn't the same as the order in which they are written down. For example, if you present a compiler with the expression 2+3*5 it will scan the characters from left to right and generate the code to add 2 to 3 and then multiply the result by 5 but this, of course, would give the wrong answer. It has been traditional in mathematics to do multiplications before additions and the correct machine code should do the multiplication first and then add 2 to the result.

When you first see this sort of difficulty it is tempting to believe that it can be fixed up by some simple ad hoc addition to the method that the compiler uses to translate the high level language. If you try this you will find it nearly impossible because an arithmetic expression can be arbitrarily complex e.g. (2+3*5+4/6)*10+16-(14+15)*8.

What is needed is a general way of translating an arithmetic expression into code that carries out each operation in the correct order. Such a method, stack evaluation was found during the development of Fortran by John Backus leading a team of IBM programmers. The Fortran project took four or five years to complete starting in 1954 and it succeeded in proving the viability of high level languages.

The name Fortran stands for FORmula TRANslator - its full title was  The IBM Formula Translating System. Fortran was an IBM product but even the baby Big Blue of the time must have been surprised at how fast it became the language of computing.

Contemporary programmers are equally surprised that 30+ year old Fortran is still a popular language for some important applications, particularly in science and engineering - climate modelling, for example. It has evolved from the original Fortran 1, through Fortran II, Fortran 66 (also known as Fortran IV), Fortran 77, Fortran 90 and 95 and curently we are using Fortran 2003 and work is underway towards a later-dated version. Even though it has evolved it hasn't changed out of all recognition and is still so true to its original design that a Fortran 1 programmer would be able to follow something in Fortran 2003.

As the first high level language Fortran is clearly important but it also influenced many generations of programmers, especially when you take into account the popularity of BASIC which was a language derived directly from Fortran. Fortran is also important because it marked the start of the rise of IBM as a dominating power in computing. As Fortran succeeded so did IBM.

Many of the key facilities that we have come to expect of a high level language including arithmetic and logical expressions; the DO loop (an early form of the FOR loop); the IF statement; subroutines; arrays; and formatting were introduced by Fortran

Languages proliferate

Once Fortran had shown how to construct compilers the flood gates were open. It was possible to design and implement any language that a bored programmer could dream up. I suppose we should be grateful that more languages didn't catch on but the idea of application-specific languages did.

Fortran 1 was essentially a scientific language, suitable for number crunching. The first version had no way of handling text and later versions only solved the problem by converting characters to numeric values! This made Fortran distinctly unsuitable for business use, as a result Cobol - COmmon Business Oriented Language was created. At this stage in the development it looked as though a new language would be created to suit every need.

The next major language, Algol (ALGOrithmic Language), was the invention of the computer scientists to allow a consistent and compact way of representing programs for publication and as a research language. Surprisingly this marked the end of the boom. The trinity of Fortran - for the scientists and engineers, Cobol - for business and Algol - for the computer people, proved to be sufficient and even today many new languages can be classified as Fortran-, Cobol- or Algol-like.

Although both Cobol and Algol started their development in the late 50's their impact and history stretches into the 60's. They are really the seeds for the next ten years of language development. The story of Algol and Cobol is featured in the next article dealing with the 60s. Fortran was the trail blazer that others followed. Its production was and still is the major event in the history of programming languages and it is only fitting that the 50s should be thought of as the Fortran decade.

<ASIN:0824708024>

<ASIN:1848825420>



Last Updated ( Thursday, 14 January 2010 10:57 )
 
 

   
RSS feed of all content
I Programmer - full contents
Copyright © 2013 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.