In
computer science, a high-level programming language is a
programming language with strong
abstraction from the details of the
computer
A computer is a machine that can be programmed to Execution (computing), carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as C ...
. In contrast to
low-level programming languages, it may use
natural language
In neuropsychology, linguistics, and philosophy of language, a natural language or ordinary language is any language that has evolved naturally in humans through use and repetition without conscious planning or premeditation. Natural languages ...
''elements'', be easier to use, or may automate (or even hide entirely) significant areas of computing systems (e.g.
memory management), making the process of developing a program simpler and more understandable than when using a lower-level language. The amount of abstraction provided defines how "high-level" a programming language is.
In the 1960s, a high-level programming language using a
compiler was commonly called an ''
autocode''.
Examples of autocodes are
COBOL
COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural and, since 2002, object-oriented language. COBOL is primarily us ...
and
Fortran.
The first high-level programming language designed for computers was
Plankalkül, created by
Konrad Zuse. However, it was not implemented in his time, and his original contributions were largely isolated from other developments due to
World War II, aside from the language's influence on the "Superplan" language by
Heinz Rutishauser and also to some degree
ALGOL. The first significantly widespread high-level language was
Fortran, a machine-independent development of IBM's earlier
Autocode systems. The
ALGOL family, with
ALGOL 58 defined in 1958 and
ALGOL 60
ALGOL 60 (short for ''Algorithmic Language 1960'') is a member of the ALGOL family of computer programming languages. It followed on from ALGOL 58 which had introduced code blocks and the begin and end pairs for delimiting them, representing a k ...
defined in 1960 by committees of European and American computer scientists, introduced
recursion as well as
nested functions
In computer programming, a nested function (or nested procedure or subroutine) is a subroutine, function which is defined within another function, the ''enclosing function''. Due to simple recursive scope (programming), scope rules, a nested funct ...
under
lexical scope. ALGOL 60 was also the first language with a clear distinction between
value
Value or values may refer to:
Ethics and social
* Value (ethics) wherein said concept may be construed as treating actions themselves as abstract objects, associating value to them
** Values (Western philosophy) expands the notion of value beyo ...
and
name-parameters and their corresponding
semantics. ALGOL also introduced several
structured programming
Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making extensive use of the structured control flow constructs of selection ( if/then/else) and repetition ( ...
concepts, such as the
while-do
and
if-then-else
constructs and its
syntax
In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure ( constituency) ...
was the first to be described in formal notation – ''
Backus–Naur form
In computer science, Backus–Naur form () or Backus normal form (BNF) is a metasyntax notation for context-free grammars, often used to describe the syntax of languages used in computing, such as computer programming languages, document formats ...
'' (BNF). During roughly the same period,
COBOL
COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural and, since 2002, object-oriented language. COBOL is primarily us ...
introduced
record
A record, recording or records may refer to:
An item or collection of data Computing
* Record (computer science), a data structure
** Record, or row (database), a set of fields in a database related to one entity
** Boot sector or boot record, ...
s (also called structs) and
Lisp
A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech.
Types
* A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lisping ...
introduced a fully general
lambda abstraction in a programming language for the first time.
Features
"High-level language" 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,
object
Object may refer to:
General meanings
* Object (philosophy), a thing, being, or concept
** Object (abstract), an object which does not exist at any particular time or place
** Physical object, an identifiable collection of matter
* Goal, an ai ...
s, complex arithmetic or boolean expressions, subroutines and functions, loops,
thread
Thread may refer to:
Objects
* Thread (yarn), a kind of thin yarn used for sewing
** Thread (unit of measurement), a cotton yarn measure
* Screw thread, a helical ridge on a cylindrical fastener
Arts and entertainment
* ''Thread'' (film), 2016 ...
s, locks, and other abstract computer science concepts, with a focus on
usability
Usability can be described as the capacity of a system to provide a condition for its users to perform the tasks safely, effectively, and efficiently while enjoying the experience. In software engineering, usability is the degree to which a soft ...
over optimal program efficiency. Unlike low-level
assembly language
In computer programming, assembly language (or assembler language, or symbolic machine code), often referred to simply as Assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence be ...
s, high-level languages have few, if any, language elements that translate directly into a machine's native
opcode
In computing, an opcode (abbreviated from operation code, also known as instruction machine code, instruction code, instruction syllable, instruction parcel or opstring) is the portion of a machine language instruction that specifies the operat ...
s. Other features, such as string handling routines, object-oriented language features, and file input/output, may also be present. One thing to note about high-level programming languages is that these languages allow the programmer to be detached and separated from the machine. That is, unlike low-level languages like assembly or machine language, high-level programming can amplify the programmer's instructions and trigger a lot of data movements in the background without their knowledge. The responsibility and power of executing instructions have been handed over to the machine from the programmer.
Abstraction penalty
High-level languages intend to provide features that standardize common tasks, permit rich debugging, and maintain architectural agnosticism; while low-level languages often produce more efficient code through
optimization for a specific system architecture. ''Abstraction penalty'' is the cost that high-level programming techniques pay for being unable to optimize performance or use certain hardware because they don't take advantage of certain low-level architectural resources. High-level programming exhibits features like more generic data structures and operations, run-time interpretation, and intermediate code files; which often result in execution of far more operations than necessary, higher memory consumption, and larger binary program size. For this reason, code which needs to run particularly quickly and efficiently may require the use of a lower-level language, even if a higher-level language would make the coding easier. In many cases, critical portions of a program mostly in a high-level language can be hand-coded in
assembly language
In computer programming, assembly language (or assembler language, or symbolic machine code), often referred to simply as Assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence be ...
, leading to a much faster, more efficient, or simply reliably functioning
optimised program.
However, with the growing complexity of modern
microprocessor architectures, well-designed compilers for high-level languages frequently produce code comparable in efficiency to what most low-level programmers can produce by hand, and the higher abstraction may allow for more powerful techniques providing better overall results than their low-level counterparts in particular settings.
High-level languages are designed independent of a specific computing system architecture. This facilitates executing a program written in such a language on any computing system with compatible support for the Interpreted or
JIT program. High-level languages can be improved as their designers develop improvements. In other cases, new high-level languages evolve from one or more others with the goal of aggregating the most popular constructs with new or improved features. An example of this is
Scala which maintains backward compatibility with
Java which means that programs and libraries written in Java will continue to be usable even if a programming shop switches to Scala; this makes the transition easier and the lifespan of such high-level coding indefinite. In contrast, low-level programs rarely survive beyond the system architecture which they were written for without major revision. This is the engineering 'trade-off' for the 'Abstraction Penalty'.
Relative meaning
Examples of high-level programming languages in active use today include
Python,
JavaScript,
Visual Basic,
Delphi
Delphi (; ), in legend previously called Pytho (Πυθώ), in ancient times was a sacred precinct that served as the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient classical world. The oracle ...
,
Perl,
PHP,
ECMAScript,
Ruby,
C#,
Java and many others.
The terms ''high-level'' and ''low-level'' are inherently relative. Some decades ago, the
C language, and similar languages, were most often considered "high-level", as it supported concepts such as expression evaluation,
parameterised recursive functions, and data types and structures, while
assembly language
In computer programming, assembly language (or assembler language, or symbolic machine code), often referred to simply as Assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence be ...
was considered "low-level". Today, many programmers might refer to C as low-level, as it lacks a large
runtime-system (no garbage collection, etc.), basically supports only scalar operations, and provides direct memory addressing. It, therefore, readily blends with assembly language and the machine level of
CPU
A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, and ...
s and
microcontroller
A microcontroller (MCU for ''microcontroller unit'', often also MC, UC, or μC) is a small computer on a single VLSI integrated circuit (IC) chip. A microcontroller contains one or more CPUs (processor cores) along with memory and programmable i ...
s. Also, in the introduction chapter of
The C Programming Language (second edition) by K&R, C is considered as a relatively "low level" language.
Assembly language may itself be regarded as a higher level (but often still one-to-one if used without
macro
Macro (or MACRO) may refer to:
Science and technology
* Macroscopic, subjects visible to the eye
* Macro photography, a type of close-up photography
* Image macro, a picture with text superimposed
* Monopole, Astrophysics and Cosmic Ray Observat ...
s) representation of
machine code, as it supports concepts such as constants and (limited) expressions, sometimes even variables, procedures, and
data structure
In computer science, a data structure is a data organization, management, and storage format that is usually chosen for efficient access to data. More precisely, a data structure is a collection of data values, the relationships among them, a ...
s.
Machine code, in its turn, is inherently at a slightly higher level than the
microcode
In processor design, microcode (μcode) is a technique that interposes a layer of computer organization between the central processing unit (CPU) hardware and the programmer-visible instruction set architecture of a computer. Microcode is a laye ...
or
micro-operations used internally in many processors.
Execution modes
There are three general modes of execution for modern high-level languages:
; Interpreted: When code written in a language is
interpreted, its syntax is read and then executed directly, with no compilation stage. A program called an ''interpreter'' reads each program statement, following the program flow, then decides what to do, and does it. A hybrid of an interpreter and a compiler will compile the statement into machine code and execute that; the machine code is then discarded, to be interpreted anew if the line is executed again. Interpreters are commonly the simplest implementations of the behavior of a language, compared to the other two variants listed here.
; Compiled: When code written in a language is
compiled
In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
, its syntax is transformed into an executable form before running. There are two types of compilation:
:; Machine code generation: Some compilers compile source code directly into
machine code. This is the original mode of compilation, and languages that are directly and completely transformed to machine-native code in this way may be called ''truly compiled'' languages. See
assembly language
In computer programming, assembly language (or assembler language, or symbolic machine code), often referred to simply as Assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence be ...
.
:; Intermediate representations: When code written in 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 may be in a form such as
bytecode
Bytecode (also called portable code or p-code) is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (norma ...
. The intermediate representation must then be interpreted or further compiled to execute it.
Virtual machines that execute bytecode directly or transform it further into machine code have blurred the once clear distinction between intermediate representations and truly compiled languages.
; Source-to-source translated or transcompiled: Code written in a language may be translated into terms of a lower-level language for which native code compilers are already common.
JavaScript and the language
C are common targets for such translators. See
CoffeeScript,
Chicken Scheme, and
Eiffel
Eiffel may refer to:
Places
* Eiffel Peak, a summit in Alberta, Canada
* Champ de Mars – Tour Eiffel station, Paris, France; a transit station
Structures
* Eiffel Tower, in Paris, France, designed by Gustave Eiffel
* Eiffel Bridge, Ungheni, M ...
as examples. Specifically, the generated C and C++ code can be seen (as generated from the Eiffel language when using the
EiffelStudio IDE) in the EIFGENs directory of any compiled Eiffel project. In Eiffel, the ''translated'' process is referred to as transcompiling or transcompiled, and the Eiffel compiler as a transcompiler or
source-to-source compiler.
Note that languages are not strictly ''interpreted'' languages or ''compiled'' languages. Rather, implementations of language behavior use interpreting or compiling. For example,
ALGOL 60
ALGOL 60 (short for ''Algorithmic Language 1960'') is a member of the ALGOL family of computer programming languages. It followed on from ALGOL 58 which had introduced code blocks and the begin and end pairs for delimiting them, representing a k ...
and
Fortran have both been interpreted (even though they were more typically compiled). Similarly, Java shows the difficulty of trying to apply these labels to languages, rather than to implementations; Java is compiled to bytecode which is then executed by either interpreting (in a
Java virtual machine
A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes ...
(JVM)) or compiling (typically with a just-in-time compiler such as
HotSpot
Hotspot, Hot Spot or Hot spot may refer to:
Places
* Hot Spot, Kentucky, a community in the United States
Arts, entertainment, and media Fictional entities
* Hot Spot (comics), a name for the DC Comics character Isaiah Crockett
* Hot Spot (Tra ...
, again in a JVM). Moreover, compiling, transcompiling, and interpreting is not strictly limited to only a description of the compiler artifact (binary executable or IL assembly).
High-level language computer architecture
Alternatively, it is possible for a high-level language to be directly implemented by a computer – the computer directly executes the HLL code. This is known as a ''
high-level language computer architecture'' – the
computer architecture itself is designed to be targeted by a specific high-level language. The
Burroughs large systems
The Burroughs Large Systems Group produced a family of large 48-bit mainframes using stack machine instruction sets with dense syllables.E.g., 12-bit syllables for B5000, 8-bit syllables for B6500 The first machine in the family was the B5000 in ...
were target machines for
ALGOL 60
ALGOL 60 (short for ''Algorithmic Language 1960'') is a member of the ALGOL family of computer programming languages. It followed on from ALGOL 58 which had introduced code blocks and the begin and end pairs for delimiting them, representing a k ...
, for example.
See also
*
Abstraction (computer science)
In software engineering and computer science, abstraction is:
* The process of removing or generalizing physical, spatial, or temporal details or attributes in the study of objects or systems to focus attention on details of greater importance; ...
*
Generational list of programming languages
This is a "genealogy" of programming languages. Languages are categorized under the ancestor language with the strongest influence. Those ancestor languages are listed in alphabetical order. Any such categorization has a large arbitrary element ...
*
Low-level programming languages
*
High-level assembler
A high-level assembler in computing is an assembler for assembly language that incorporate features found in a high-level programming language.
The earliest high-level assembler was probably Burroughs' Executive Systems Problem Oriented Language ...
*
Very high-level programming languages
*
Categorical list of programming languages
This is a list of notable programming languages, grouped by type.
There is no overarching classification scheme for programming languages. Thus, in many cases, a language is listed under multiple headings (in this regard, see " Multiparadigm lan ...
Notes
References
External links
* http://c2.com/cgi/wiki?HighLevelLanguage - The
WikiWikiWeb's article on high-level programming languages
{{DEFAULTSORT:High-Level Programming Language
Programming language classification