Computer Programming for Absolute Beginners
上QQ阅读APP看书,第一时间看更新

How programming languages have evolved?

Between 1943 and 1945, Konrad Zuse, a German civil engineer, developed a programming language called Plankalkül. Even though this language was not implemented at the time, it held the foundations for what we now call high-level programming languages and was an inspiration for other languages that followed.

In late 1953, John W. Backus, an American computer scientist working at IBM, submitted a proposal to his superiors to develop an alternative to assembly. In 1954, Backus and his team published the first draft specification for this language, and in April 1957, the first version of the FORTRAN (the all caps naming standard later changed to Fortran) programming language was released. At first, this language was met with some skepticism as it could not produce programs that ran as fast as the ones written in Assembly. However, the fact that programs written in this new language had far fewer lines and were more comfortable to write and understand soon outweighed the fact that it ran a bit slower than the handwritten assembly programs.

Fortran became a success and is still used today, even if it is only used for some very specialized applications, such as how to measure the performance of supercomputers.

Fortran was soon followed by some other programming languages that have influenced how we write programs today.

In 1958, a programming language called Lisp was created by John McCarty, an American computer scientist working at MIT. Lisp originated many concepts that were later adopted by other programming languages. In Chapter 10, Programming Paradigms, we will talk about the different paradigms used in programming, and Lisp introduced one such paradigm called functional programming. Lisp lives today through several languages, often referred to as Lisp dialects. Among them, we find languages such as Clojure, Common Lisp, and Scheme.

In 1958, another important language was created that has influenced several of the most popular languages we use today. It is called ALGOL and was developed by a committee of American and European computer scientists at a meeting in Zurich. The most important legacy of ALGOL is how we structure code into separate blocks, a concept widely used today.

The 1950s finally saw one more language that is worth mentioning as it is still in use, and that is COBOL. The idea was to create a language that was English-like and oriented toward business applications. The name is an abbreviation for Common Business-Oriented Language. A group of representatives from academia, computer users, and manufacturers developed COBOL at the University of Pennsylvania in 1959. One member of this group was Grace Hopper. She had earlier invented an English-like data processing language called FLOW-MATIC, which became an essential source of inspiration for COBOL. For a long time, COBOL was the number one language for developing business applications and is still in use today in the financial sector.

The modern era of programming languages

These languages created the foundation and served as an inspiration for languages developed during the 60s and 70s. We will mention a few languages developed during this time as they have been essential in either introducing new concepts to programming or have served as an inspiration to others.

In the late 1960s, two Norwegian computer scientists, Ole-Johan Dahl and Kristen Nygaard, invented a language called Simula, which popularized another paradigm, object orientation. We will talk more about what object orientation is in Chapter 10, Programming Paradigms. It has inspired several modern languages that use this paradigm, such as C++, Java, and C# (pronounced C sharp).

Between 1969 and 1973, Dennis Ritchie and Ken Thomson at Bell Labs developed a programming language called C, which is still one of the most popular programming languages and the primary influencer for many of today's top languages. Among these, we find languages such as C++, Java, Go, JavaScript, Perl, PHP, Python, and C#. What is it that makes C so popular and influential? There are several answers to this. One reason is the way the code looks and the rules for how the code is structured. This style inspires many languages, and they reuse it with minor or no modifications. Another reason is that programs written in C run fast and for that reason, when an application requires high speed or in some other way needs high performance, C or some of its related languages are perfect for the job.

Why so many languages?

There are several reasons why someone will develop a new language. One can be that the person uses language but doesn't think the structure of the code is good enough, or they think that some things could be done more efficiently. It can also be that a language is developed to target a special kind of application. In Chapter 3, Types of Applications we will look at some different types of applications, and these might have some requirements that make one language better suited to meet them than other languages will.

A programming language can give a programmer direct access to computer hardware. This means that it will let the programmer have more control over how data will be represented and stored in the computer's memory. The benefit of this is that programs written in this sort of language have the potential of being more efficient or running faster. However, this comes at the cost of complexity. When more control is given to the programmer, we also give the programmer more chances to make errors.

Some languages give us less control but are easier to use. The disadvantage here is that programs written in these languages tend to run slower.

For example, if we want to write a high-end game where we want the best possible graphics, the best sound, advanced computer AI, and multiplayer capabilities, we will need to do our best to get as much performance as possible out of the computer hardware. We will then select a language that will give us as much control as possible as we want to fine-tune all aspects of our program to their optimum configurations.

If we instead write some administrative software, the speed of the application will not be our focus; rather, we want a programming language that will help us write high-quality software with as few errors as possible. Some programming languages also have a structure that makes writing programs easier, which in turn reduces the time spent by the programmer in writing the software.

Requirements like this can also be the motivation for creating a new programming language. A programming language is nothing more than a tool that we use to create programs, and as with all tools, we want it to be as functional for the task as possible.