1

I wrote this a few years ago as part of a C manual I wrote, but did not finish. I thought it might be interesting to the people on DaniWeb.

Programming Language Generations

Different types of programming languages are often grouped into large categories known as generations. Each generation consists of languages that behave in similar ways. The higher the generation number, the more abstraction is present in the language and the more indirect is the programmer's interaction with the computer. A first-generation language gives almost direct access to the hardware and operations of the computer, while a fourth-generation language isolates the programmer from almost all of the operational details to perform the desired task.

First-Generation Languages

First-generation languages are the first languages created for computers. (No great surprise there!) Each processor (CPU) uses a set of numeric codes to tell it what to do. Different types of processors (e.g. Pentium vs. Power-PC vs. Sparc) use different sets of numbers for their instructions. These sets of numbers are the first-generation languages. These first-generation languages are often called machine language.

Using first-generation languages gives the programmer the greatest degree of control, but this also means that the programmer must manage every aspect of the execution of the program and programs are not portable, that is, they can not be taken from one computer and execute on another, unless the processor and operating system are identical. Also the programmer must remember or look up what each numeric code means and does. A first-generation language instruction might be represented as:
4E 00 2A 31

This is the hexadecimal representation of the numeric instructions for a mythical processor. The 4E could be the instruction, which tells the computer to store the next value (0) into the given address (2A31).

Second-Generation Languages

Second-generation languages are only one step away from machine language. These languages are often called assembly code. Assembly instructions correspond one-to-one with machine language instructions. That is to say, one assembly instruction is compiled to one machine language instruction. Assembly code instructions generally begin with a mnemonic code, followed by numeric arguments, usually in hexadecimal notation. The mnemonics are easier to remember than the numeric codes of first-generation languages, but the programmer still has to manage everything the program will be doing, at the finest level of detail.

These days, each processor developer, such as Intel or Sun, creates an assembly code for each processor it develops. A second-generation language instruction might look like:
STR #00, $2A31
(This instruction translates into the the example in the First-Generation section, and thus does the same thing.)

Third-Generation Languages

Third-generation languages are what most people usually think about when they think of programming languages. These are procedural languages, where the programmer still tells the computer what to do, step-by-step, but each third-generation language instruction often corresponds to more than one first-generation language instruction. Sometimes, one third-generation instruction is translated into hundreds or thousands of first-generation language instructions. Examples of third-generation languages are Ada, BASIC, COBOL, FORTRAN, Pascal and shell scripts. C, and its descendants, including C++, C#, Java and Javascript, are also third-generation languages.

Fourth-Generation Languages

Fourth-generation languages are descriptive languages. The programmer describes the kind of result that is expected, without telling the computer exactly how to do it. It is up to the software to determine how to accomplish the tasks described in the fourth-generation language instructions. Popular fourth-generation languages include SQL (to manipulate relational databases), Postscript (to describe page layout for laser printing) and HTML (to describe how World Wide Web pages look), among others.

Fifth-Generation Language

Fifth-generation languages are constraint-defining languages. Rather than describe the tasks to be done, or the kind of output desired, a programmer uses a fifth-generation language to describe the limits of a problem and then the program determines the solution set based on the given constraints. Prolog is probably the best known fifth-generation language.

Edited by Nutster: Add introduction. Grammar improvements.

Votes + Comments
Good to know.
2
Contributors
1
Reply
34
Views
4 Years
Discussion Span
Last Post by <M/>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.