Higher programming language

from Wikipedia, the free encyclopedia

A high-level programming language is a programming language for the creation of a computer program that is significantly removed from the level of the machine languages in terms of abstraction and complexity . The boundary between simple and high-level programming languages ​​is not clearly defined. The minimum requirement is that the commands in higher programming languages ​​cannot be understood and executed directly by microprocessors . The commands must be translated into machine language by an interpreter or compiler . Often there are additional levels such as extensive operating systems in between.

The term “higher” language in computer science does not refer to the degree of difficulty in programming. On the contrary, high-level programming languages ​​should make it easier to operationalize complex tasks with a computer program . Rather, the “higher” attribute relates to the abstraction level of the programming language. In simple terms, one can say that higher programming languages ​​express more and more complex logical relationships with less text, which is then broken down into machine code by automated processes. This increases the readability of the program text and reduces the number of explicit recursive tasks.

history

The first computers were programmed in machine code with the help of programs . This only consists of a sequence of numbers that are interpreted by the processor as a command sequence. These commands consist of simple instructions such as arithmetic, memory access, etc. The first innovation was the invention of assembly languages , which do not abstract, but represent the commands in text form.

Plankalkül by Konrad Zuse can be regarded as the world's first higher programming language, although it was not used in practice. It was not until the late 1950s that computers became so powerful that translation programs could make entering programs much easier. Fortran , ALGOL and Lisp were the first representatives whose names still remind of the new, more convenient options offered by languages ​​and translator programs:

  • Fortran - FOR mula TRAN slation = formula translation
  • ALGOL - ALGO rithmic L anguage = algorithm language
  • LISP - LIS t P rocessing = list processing

These first higher languages ​​contained abstract elements such as conditional statements ("if x is true, then do y") and loops ("as long as x holds, do y"). These constructs could now be programmed with less effort and expressed their purpose in a readable form.

Other languages ​​followed later that offered a higher degree of abstraction. A program could be divided into subprograms (procedures) and these in turn could be combined into modules. It was thus possible to have partial programs developed by different programmers without having to make a convention about the variables used, since the variables were redefined for each procedure. However, input and output parameters were passed from the main to the subroutine and vice versa.

The first high-level languages ​​were translated directly into assembly languages ​​or machine code in order to be executed. Some more modern languages ​​are now initially translated into less high-level languages, from which, in turn, efficient machine code can be obtained. The programs with which such translations are carried out are called compilers . So the abstractions are now well advanced and the term “higher language” is very relative. So the first languages ​​like Fortran are higher languages ​​than assembler and more modern languages ​​are higher than Fortran.

In addition, a program can also be interpreted in a higher-level programming language. The program is not translated into machine code in advance, but rather an interpreter executes the instructions during its runtime . This forms an interface between the computer and the program and is now mostly written in another high-level programming language.

Most “modern” programming languages ​​( BASIC , C , C ++ , C # , VB.NET , Pascal and Java ) are third generation languages .

Compared to assembly language

Assembly language Higher programming language
Strongly compressed, space-saving syntax Syntax adapted to human habits
Can only run on a certain type of processor Mostly independent of the processor
High speed thanks to machine-level commands Loss of speed due to translation into machine language
Data types of the processor ( byte , word , long word ) Abstract, machine-independent data types ( floating point numbers, etc.)
Simple data types only Data structures (field, record)
Jump commands, macros Several control structures ( if , while , ...)
Basic semantic analysis possible Extensive semantic analysis possible

Example:

      .START ST
  ST: MOV R1,#2
      MOV R2,#1
  M1: CMP R2,#20
      BGT M2
      MUL R1,R2
      INI R2
      JMP M1
  M2: JSR PRINT
      .END

Example:

  A:=2;
  FOR I:=1 TO 20 LOOP
      A:=A*I;
  END LOOP;
  PRINT(A);

Classification and succession

The higher programming languages ​​are also called third generation programming languages ​​(English third generation languages , 3GL for short ). Third generation programming languages ​​need to describe exactly how a particular problem is to be solved. The task is difficult to recognize from the source code. That is why fourth generation programming languages ​​were developed, usually optimized for solving specific problems, and where the code describes what the computer should do.

Today there are many different high-level programming languages, some of which are generally applicable, but others are only used for special purposes. General purpose languages ​​are not tailored to specific use cases and offer general abstractions. The so-called Domain Specific Languages (DSL), on the other hand, enable abstractions for a specific application. The latter are currently being intensively researched. There are languages ​​for the track control of train routes with partly graphic programming, i. H. the “program text” there consists of graphics that can be manipulated, for example, by mouse input. The aim of this programming method is to make writing programs in text form unnecessary and to make programming accessible to a larger group of users through intuitive operation.

Examples

Some examples of current high-level programming languages ​​are listed below. In addition to the name, it is indicated whether the language is interpreted or whether it is translated into machine code by a compiler. In the case of interpreted languages, a corresponding program (interpreter) is required at runtime in order to interpret and execute the source code.

See also

Web links

Individual evidence

  1. blackdwarf: What is managed code? Retrieved on March 10, 2019 (German).