Informatics Educational Institutions & Programs

Content deleted Content added
Rsm99833 (talk | contribs)
m Reverted edits by 170.158.74.101 (talk) to version 54838145 by Dakpowers using VandalProof
Fiend666 (talk | contribs)
Line 7: Line 7:


===Relative meaning===
===Relative meaning===
Note that the terms "high-level" and "low-level" are inherently relative. Originally, [[assembly language]] was considered low-level and [[COBOL]], [[C programming language|C]], etc. were considered high-level, as they allowed the abstractions of functions, variables and expression evaluation. Many programmers today might refer to C as low-level, as it still allows memory to be accessed by address, and provides direct access to the assembly level. For more on this distinction, see the external link below.
Note that the terms "high-level" and "low-level" are inherently relative. Originally, [[assembly language]] was considered low-level and [[COBOL]], [[C programming language|C]], etc. were considered high-level, as they allowed the abstractions of functions, variables and expression evaluation, and also that they had to be compiled to assembly before being compiled into machine code. Many programmers today might refer to C as low-level, as it still allows memory to be accessed by address, and provides direct access to the assembly level. For more on this distinction, see the external link below.


==Execution models==
==Execution models==

Revision as of 05:19, 11 June 2006

A high-level programming language is a programming language that, in comparison to low-level programming languages, may be more abstract, easier to use, or more portable across platforms. Such languages often abstract away CPU operations such as memory access models and management of scope.

Features of high-level languages

The term "high-level language" does not imply that the language is always superior to low-level programming languages but rather refers to the higher level of abstraction from machine language. Rather than dealing with registers, memory addresses and call stacks, high-level languages deal with variables, arrays and complex arithmetic or boolean expressions. Other features such as string handling routines, object-oriented language features and file input/output may also be present.

In general, high-level languages make complex programming simpler, while low-level languages tend to produce more efficient code. In a high-level language, complex elements can be broken up into simpler, though still fairly complex, elements for which the language provides abstractions, keeping programmers from having to "reinvent the wheel." The cost of this convenience is often less efficient code overall. For this reason, code which needs to run particularly quickly and efficiently may be written in a lower-level language, even if a higher-level language would make the coding easier.

Relative meaning

Note that the terms "high-level" and "low-level" are inherently relative. Originally, assembly language was considered low-level and COBOL, C, etc. were considered high-level, as they allowed the abstractions of functions, variables and expression evaluation, and also that they had to be compiled to assembly before being compiled into machine code. Many programmers today might refer to C as low-level, as it still allows memory to be accessed by address, and provides direct access to the assembly level. For more on this distinction, see the external link below.

Execution models

There are three models of execution for modern high-level languages:

Interpreted
Interpreted languages are read and then executed directly, with no compilation stage.
Compiled
Compiled languages are transformed into an executable form before running. There are two types of compilation:
Intermediate representations
When a language is compiled to an intermediate representation, that representation can be optimized or saved for later execution without the need to re-read the source file. When the intermediate representation is saved it is often represented as byte code.
Machine code generation
Some languages compile directly into machine code (or assembly language). Virtual machines that execute byte code directly or transform it further into machine code have blurred the once clear distinction between intermediate representations and truly compiled languages.
Translated
A language may be translated into a low-level programming language for which native code compilers are already widely available. The C programming language is a common target for such translators.

See also