5 generations of computer languages

We control computers by writing code that is executed by the central processing unit (CPU). With an increasing degree, this code models the functions performed by the computer and its parts, and how they work together.  Such code has a syntax and semantics which together comprise a computer language.  Computer languages have during the last 50+ years undergone big changes.  They have become easier to use, more expressive and more structured than the first generations. 

Note that the description of the computer language generations is subject to historical reviews and may change as one get further distance to the matter. However, for the past 10 and coming10 years or so, the current description should do.

In the following presentation, some info are picked from Wikipedia [H1] and some are mixed with my own info and viewpoints into a lethal cocktail which is probably neither correct nor complete. Read at your own risk!  My effort has been less to lecture others and more to enlighten myself on the big lines and to stretch the material to find new lines.


First generation

Before computers were even built, Ada Lovelace (1815-1852) made the first notes on how to control a mechanical computer. She is considered to be the first programmer.

This analytical computer was designed by Charles Babbage (1791-1871) and was not implemented until 1991. He also designed a printer, implemented in 2000, an astonishingly complex device for the 19th century. His computer led to more complex designs.

Alan Turing (1912-1954) designed a theoretical computer which allows us to explain the functions of a modern CPU inside a computer. Despite its simplicity, a Turing Machine [T1] can be adapted to simulate the logic of any computer algorithm.

Code of the first generation programming language [G1] was entered through physical switches on the computer and involved commands to move data bits to and from registers, compute on these and more. A sequence of such commands is known as code. Specifically, code that a machine can read and understand according to its logical design is called machine code [M1], which is in contrast to human readable code. The first generation of programming languages is all about machine code. Such code give fast executions but is tedious to write and is brittle [C1] to changes.


Second generation
 
Improves on first generation by providing code as human readable source code with logically structures. The source code must be assembled into machine code before it can be executed by a CPU. This assembly step is done by an assembler.

Such languages are sometimes still used for kernels and device drivers, i.e. the core of the operating system and for specific machine parts. More often, such languages are used in areas of intense processing, like graphics programming, when the code needs to be optimized for performance.

2GL source code is not portable across processors or processing environments.


Third generation

Improves on second generation by making a language architecture independent, i.e. no longer tailored to the processor or environment, which requires a compiler to make machine code for the CPU. Some, like Java, make use of an intermediate code which is run by a virtual machine, reaching further architecture independence. In such a case, only the virtual machine needs to be run by something that is architecture specific.

Another aspect of third generation [G3] is that they are more programmer-friendly with features like good support for aggregate data types and expressing concepts in a way that favors the programmer, not the computer (e.g. no longer needing to state the length of multi-character (string) literals in Fortran). 

High level language is a synonym for third-generation programming language. The computer take care of non-essential details, not the programmer.

Early language examples: Algol, Cobol (business), Fortran (scientific)
Structured language examples: C
Object oriented examples: C++, Delphi, C#, Java, Python
Functional examples: Scala

This generation support structured programming [S1].  While later developments include object-oriented programming [O1] which dominates today and functional programming [F1], some groups have advocated the concept of 4GL and 5GL to mark the distinct difference these other languages have in comparison with 3GL. It remains to see what classifications will win the hearts of the historians in the next 100 years.


Fourth generation

Improves on 3GL and their development methods with higher abstraction and statement power, to reduce errors and increase development speed by reducing programming effort. 

A 4GL is designed with a specific purpose in mind. This offers a high potential. 4GL are not always successful, sometimes resulting in inelegant and unmaintainable code. However, given the right problem, the use of an appropriate 4GL can be spectacularly successful. (This refers to an example with 8 times productivity gains over Cobol). [G4]

In some senses, software engineering supports 3GL, while 4GL are more oriented towards problem solving and systems engineering. 

Some argues that 4GL is a subset of the so-called DSL or domain-specific languages. [D1]

Examples: Oracle Forms, PL/SQL, Revolution language, SAS, SPSS, SQL


Fifth generation

Improves on the previous generations by skipping algorithm writing and instead provide constraints.

While 4GL are designed to build specific programs, 5GL are designed to make the computer solve a given problem without the programmer. This way, the programmer only needs to worry about what problems need to be solved and what conditions need to be met, without worrying about how to implement a routine or algorithm to solve them. [G5]

Examples: Prolog, OPS5, Mercury

On a critical view, Prolog kind of systems have a high performance penalty. With better implementation techniques, this penalty have been shown to be 25%-50% of conventional programming languages.


Assorted development concerns

Change. Beyond the initial academic simple examples and closer to the real world application of computers, there seems to always be changes and unforeseen complexity. Changes are needed to fix the inevitable bugs and to rewrite functionality to changing requirements. It turns out that keeping feature creep [C2] abreast is important to deliver results on time. Customers keep changing their mind about what is valuable in the product, and change management becomes crucial [C3]. 

A learning curve that ends with customization. Users want to get up and running quickly, which implies simple, clean interfaces. When they grow used to it, there is no limit to their customization wish and some event want to adjust the program themselves. A few systems offer easy starts and some offer customization; Matlab users can make scripts that extend their functionality. Unix users can make aliases and scripts to be powerful commands. Some games start off with an easy interface and have no limits in how complex interface they offer for an expert user. A good example would be World of Warcraft [W1]; the amount of action buttons increase as one is advancing in game, custom lua [L1] scripting and hot-keys are available, as well as a massive amount of add-ons which are publicly available scripts written by other users [A1, A2], easily accessible through various Add-on providers [P1, P2]. 

Immediate feedback to user. Some systems are built as desktop applications only. The web browsers now offer Ajax-based RIA applications. This is all because users prefer immediate feedback on their interactions.

Security. With improved global communication features follows the concern to keep data within authorized bounds. Data should only be available to those which have specific permission to access it. Only authenticated users is valid users. Nobody else should have access. People are truly concerned about security.

Open source. Most such languages come with one or more libraries of ready to use functions. These are thoroughly tested and contains many commonly used algorithms, like sorting, list management, and simple display technologies. Over time new technologies arrives, making it necessary to update ones tech skills now and then. Some of these technologies are available free of charge, sometimes depending on its use. Development is done by small groups communicating on the Internet. Where one person starts, others soon join. Source code, precompiled binaries and screen shots are usually available for download.

Rapid application development (RAD). Minimal planning in favor of rapid prototyping. Reducing the extensive pre-planning allows starting to write software earlier, and makes it easier to change requirements.

Populære innlegg fra denne bloggen

Stupidly simple API code

Equal salary encourages more job jumping