Computer Programming

All computers operate by following machine language programs, a long sequence of instructions called machine code that is addressed to the hardware of the computer and is written in binary notation, which uses only the digits 1 and 0. First-generation languages, called machine languages, required the writing of long strings of binary numbers to represent such operations as “add,” “subtract,” and “compare.” Later improvements allowed octal, decimal, or hexadecimal representation of the binary strings.

Because writing programs in machine language is impractical (it is tedious and error prone), symbolic, or assembly, languages—second-generation languages—were introduced in the early 1950s. They use simple mnemonics such as A for “add” or M for “multiply,” which are translated into machine language by a computer program called an assembler. The assembler then turns that program into a machine language program. An extension of such a language is the macro instruction, a mnemonic (such as “READ”) for which the assembler substitutes a series of simpler mnemonics. The resulting machine language programs, however, are specific to one type of computer and will usually not run on a computer with a different type of central processing unit (CPU).

The lack of portability between different computers led to the development of high-level languages—so called because they permitted a programmer to ignore many low-level details of the computer's hardware. Further, it was recognized that the closer the syntax, rules, and mnemonics of the programming language could be to “natural language” the less likely it became that the programmer would inadvertently introduce errors (called “bugs”) into the program. Hence, in the mid-1950s a third generation of languages came into use. These algorithmic, or procedural, languages are designed for solving a particular type of problem. Unlike machine or symbolic languages, they vary little between computers. They must be translated into machine code by a program called a compiler or interpreter.

Early computers were used almost exclusively by scientists, and the first high-level language, FORTRAN [FORmula TRANslation], was developed for scientific and engineering applications about 1956 by John Backus at the IBM Corp. A program that handled recursive algorithms better, LISP [LISt Processing], was developed by John McCarthy at the Massachusetts Institute of Technology in the early 1950s; implemented in 1959, it has become the standard language for the artificial intelligence community. COBOL [COmmon Business Oriented Language], the first language intended for commercial applications, is still widely used; it was developed by a committee of computer manufacturers and users under the leadership of Grace Hopper, a U.S. Navy programmer, in 1959. ALGOL [ALGOrithmic Language], developed in Europe about 1958, is used primarily in mathematics and science, as is APL [A Programming Language], published in the United States in 1962 by Kenneth Iverson. PL/1 [Programming Language 1], developed in the late 1960s by the IBM Corp., is designed for both business and scientific use.

Ada was designed during the early 1980s in France by a team headed by Jean Ichbiah, funded by the US Department of Defense. It was designed for embedded real time systems and to fascilitate code reusability. Bernd Krieg-Bruckner designed the module system. In terms of its general features, Ada is in the ALGOL family. It is named after Lady Ada Augusta Lovelace, the world's first programmer, and daughter of the great English poet Lord Byron; she worked closely with Charles Babbage, and wrote programs for his gear-driven mechanical computers.

BASIC [Beginner's All-purpose Symbolic Instruction Code] was developed by two Dartmouth College professors, John Kemeny and Thomas Kurtz, as a teaching tool for undergraduates (1966); it subsequently became the primary language of the personal computer revolution. In 1971, Swiss professor Nicholas Wirth developed a more structured language for teaching that he named Pascal (for French mathematician Blaise Pascal, who built the first successful mechanical calculator). Modula 2, a Pascal-like language for commercial and mathematical applications, was introduced by Wirth in 1982. Ten years before that, to implement the UNIX operating system, Dennis Ritchie of Bell Laboratories produced a language that he called C; along with its extensions, called C++, developed by Bjarne Stroustrup of Bell Laboratories, it has perhaps become the most widely used general-purpose language among professional programmers.

In 1975, Guy Lewis Steele Jr. and Gerald Jay Sussman developted Scheme at MIT, a dialect of Lisp which is especially known for its simplicity.

In 1991, Sun Microsystems initiated a project which would later emerged as Java. Its first implementation, Oak, was written by James Gosling using C. In autumn 1993 Arthur Van Hoff joins the language team and implements one year later the first Java compiler written in Java. Java is an object-oriented language similar to C++ but simplified to eliminate features that are prone to programming errors. Java was developed specifically as a network-oriented language, for writing programs that can be safely downloaded through the Internet and immediately run without fear of computer viruses. This is achieved by not running a Java program on the host CPU directly, instead the program is executed in a so called virtual machine, which offers common facilities to all Java applications, and therefore offering a certain degree of portability. However, if you think of it for a while, you realize this is what an operating system is already supposed to do for applications running on top of it, so the concept remains questionable. For more details, see

Fourth-generation languages are nonprocedural—they specify what is to be accomplished without describing how. The first one, FORTH, developed in 1970 by American astronomer Charles Moore, is used in scientific and industrial control applications. Most fourth-generation languages are written for specific purposes. Fifth-generation languages, which are still in their infancy, are an outgrowth of artificial intelligence research. PROLOG [PROgramming LOGic], developed by French computer scientist Alain Colmerauer and logician Philippe Roussel in the early 1970s, is useful for programming logical processes and making deductions automatically.

A fundamentally different strain of programming languages is the family of functional programming languages. Alonzo Church developed the Lambda-calculus as an attempt to provide a basis for mathematics in 1930. In lambda calculus, every expression stands for a function with a single argument; the argument of the function is in turn a function with a single argument, and the value of the function is another function with a single argument. Functions are anonymously defined by a lambda expression which expresses the function's action on its argument. For instance, the "add-two" function f(x) = x + 2 would be expressed in lambda calculus as λ x. x + 2 and the number f(3) would be written as (λ x. x + 2) 3. Function application is left associative: f x y = (f x) y. Consider the function which takes a function as argument and applies it to the argument 3: λ x. x 3. This latter function could be applied to our earlier "add-2" function as follows: (λ x. x 3) (λ x. x+2). It is clear that the three expressions (λ x. x 3) (λ x. x+2)    and    (λ x. x + 2) 3    and    3 + 2 are equivalent. A function of two variables is expressed in lambda calculus as a function of one argument which returns a function of one argument. For instance, the function f(x, y) = x - y would be written as λ x. λ y. x - y. Formally, we start with a countably infinite set of identifiers, say {a, b, c, ..., x, y, z, x1, x2, ...}. The set of all lambda expressions can then be described by the following context-free grammar in BNF:

  1. <expr> → <identifier>
  2. <expr> → (λ <identifier> . <expr>)
  3. <expr> → (<expr> <expr>)
The pure Lambda-calculus has been proved inconsistent as a logical theory. Some type systems have been added to it in order to remedy this inconsistency.

In 1965, P. Landin proposed the ISWIM [If You See What I Mean] language, which is the precursor of languages of the ML family. J. Backus introduced FP in 1978: a language of combinators and a framework in which it is possible to reason about programs. The main particularity of FP programs is that they have no variable names. Also in 1978, R. Milner proposes a language called ML [Meta Language], intended to be the metalanguage of the LCF proof assistant (i.e. the language used to program the search of proofs). This language is inspired by ISWIM (close to Lambda-calculus) and possesses an original type system. It was implemented by a kind of interpreter written in Lisp by Mike Gordon, Robin Milner and Christopher Wadsworth. In 1980-1981, the Formel project at INRIA became interested in ML. In order to be able to use the LCF proof assistant on the various systems the Formel project was using at that time (Multics, Berkeley Unix on Vax, Symbolics), Gérard Huet decided to make the ML implementation compatible with various Lisp compilers (MacLisp, FranzLisp, LeLisp, ZetaLisp). This implementations improved performance by adding a compiler. Around 1984, several other paralell developments took place:

This led to a new implementation of ML based on the CAM. However, it was not based on SML, instead, a new dialect was born, Caml [Categorical Abstract Machine Language]. Development continued until 1994 under the Formel project and is currently continuing in project Cristal. A more detailed and complete history of Caml is also available.

David Turner proposed the Miranda programming language in 1985, which resulted in a number of offspring. All languages in the Miranda family of programming languages use lazy evaluation (i.e. the argument of a function is evaluated if and when the function needs its value---arguments are passed unevaluated to functions). They also use Milner's type system. Languages belonging to the Miranda family find their origin in the SASL language (1976) developed by D. Turner. SASL and its successors (KRC 1981, Miranda 1985 and Haskell 1990) use sets of mutually recursive equations as programs. These equations are written in a script (collection of declarations) and the user may evaluate expressions using values defined in this script.

This variety of functional programming languages led to some confusion and although each one has its specific features and advantages the need for a standard emerged. At the end of this process a brand-new programming language arose: Haskell. Haskell was an attempt to create "the" standard, non-strict, higher order functional language to achieve a consistent base for research (e.g. by providing uniform identifiers for common functions). It contains many of the features from earlier functional languages, such as higher order functions, type inference, and non-strict semantics. A novel invention in Haskell is type classes, a structured form of overloading that is reminiscent of how method names are overloaded in object-oriented languages. The first version of Haskell (1.0) was defined in 1990.

If all this information has just added to the confusion and increased the urgency level of the question "And which one is the best?", I suggest you read An Essay on Comparative Programming Linguistics. The short answer to the question is simply "There is no general answer to that question."

I'm interested in computer programming since I got my first computer. That was at the age of 12, and I started out with MS-DOS qbasic. Later on, I moved to Borland Pascal, which was also the language I was taught in school.

When I moved to Linux I started to learn all those various scripting languages like Perl and Python. After I started to dig into the internals of Emacs, I discovered Emacs Lisp, and the wonderful world of functional programming languages. So I also had a look at Common Lisp, Guile Scheme and Haskell.

My favourites today are Emacs Lisp, C and Perl, in that order.

Last Modified: 2005-10-22 16:19:00
You can view the Source Code of this page