Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

High-level programming language

From Wikipedia, the free encyclopedia
Programming language that abstracts details of computing hardware

Ahigh-level programming language is aprogramming language with strongabstraction from the details of thecomputer. In contrast tolow-level programming languages, it may usenatural language 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.[1]

High-level refers to a level of abstraction from the hardware details of aprocessor inherent inmachine and assembly code. Rather than dealing with registers, memory addresses, and call stacks, high-level languages deal with variables, arrays,objects, arithmetic andBoolean expressions,functions, loops,threads, locks, and other computer science abstractions, intended to facilitatecorrectness andmaintainability. Unlike low-levelassembly languages, high-level languages have few, if any, language elements that translate directly to a machine's nativeopcodes. Other features, such as string handling,object-oriented programming features, and file input/output, may also be provided. A high-level language allows for source code that is detached and separated from the machine details. That is, unlike low-level languages like assembly and machine code, high-level language code may result in data movements without the programmer's knowledge. Some control of what instructions to execute is handed to the compiler.

History

[edit]
[icon]
This sectionneeds expansion with: examples of more recent high-level programming languages. You can help byadding to it.(November 2025)

In the 1960s, the termautocode was commonly used to describe a high-level programming language that relied on a compiler. Notable examples of such autocodes include COBOL and Fortran.

The earliest high-level programming language ever designed for computers wasPlankalkül, developed by Konrad Zuse. However, it was never implemented during his lifetime, and his pioneering work remained largely disconnected from other advancements due to the disruptions of World War II. Even so, Plankalkül influenced Heinz Rutishauser’sSuperplan language and, to a lesser extent, the development of ALGOL.

The first high-level language to achieve widespread adoption wasFortran, a machine-independent evolution of IBM’s earlier Autocode systems. Around the same time, theALGOL family emerged—ALGOL 58 in 1958 and ALGOL 60 in 1960—created by joint committees of European and American computer scientists. ALGOL introduced key innovations such as recursion, nested functions under lexical scope, and a clear distinction between value and name parameters with their respective semantics. It also pioneered several structured programming concepts, including thewhile-do loop andif-then-else statements, and became the first language whose syntax was formally defined usingBackus–Naur form (BNF).

Meanwhile,COBOL brought the concept ofrecords (also known as structs) into mainstream programming, andLisp became the first language to implement a fully generallambda abstraction.

Abstraction penalty

[edit]

A high-level language provides features that standardize common tasks, permit rich debugging, and maintain architectural agnosticism. On the other hand, a low-level language requires the coder to work at a lower-level of abstraction which is generally more challenging, but does allow foroptimizations that are not possible with a high-level language. Thisabstraction penalty for using a high-level language instead of a low-level language is real, but in practice, low-level optimizations rarely improve performance at theuser experience level.[2][3][4] None the less, code that needs to run quickly and efficiently may require the use of a lower-level language, even if a higher-level language would make the coding easier to write and maintain. In many cases, critical portions of a program mostly in a high-level language are coded in assembly in order to meet tight timing or memory constraints. A well-designed compiler for a high-level language can produce code comparable in efficiency to what could be coded by hand in assembly, and the higher-level abstractions sometimes allow for optimizations that beat the performance of hand-coded assembly.[5] Since a high-level language is designed independent of a specific computingsystem architecture, a program written in such a language can run on any computing context with a compatible compiler or interpreter.

Unlike a low-level language that is inherently tied to processor hardware, a high-level language can be improved, and new high-level languages can evolve from others with the goal of aggregating the most popular constructs with improved features. For example,Scala maintains backward compatibility withJava. Code written in Java continue to be usable even if a developer switches to Scala. This makes the transition easier and extends the lifespan of acodebase. In contrast, low-level programs rarely survive beyond thesystem architecture which they were written for.

Relative meaning

[edit]
icon
This sectionneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources in this section. Unsourced material may be challenged and removed.(October 2018) (Learn how and when to remove this message)

The termshigh-level andlow-level are inherently relative, and languages can be compared as higher or lower level to each other. Sometimes theC language is considered as either high-level or low-level depending on one's perspective. Regardless, most agree that C is higher level than assembly and lower level than most other languages.

C supports constructs such as expression evaluation,parameterized and recursive functions, data types and structures which are generally not supported in assembly or directly by a processor but C does provide lower-level features such as auto-increment and pointer math. But C lacks many higher-level abstracts common in other languages such asgarbage collection and a built-in string type. In the introduction ofThe C Programming Language (second edition) byBrian Kernighan andDennis Ritchie, C is described as "not a very high level" language.[6]

Assembly language is higher-level than machine code, but still highly tied to the processor hardware. However, assembly may provide some higher-level features such asmacros, relatively limited expressions, constants, variables, procedures, anddata structures.

Machine code is at a slightly higher level abstraction than themicrocode ormicro-operations used internally in many processors.[7]

Execution modes

[edit]
icon
This sectionneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources in this section. Unsourced material may be challenged and removed.
Find sources: "Execution modes" – news ·newspapers ·books ·scholar ·JSTOR
(October 2018) (Learn how and when to remove this message)

The source code of a high-level language may be processed in various ways, such as:

Compiled
Acompiler transforms source code into other code. In some cases, a compiler generates native machine code that is interpreted by the processor; however, many execution models today involve generating anintermediate representation (i.e.bytecode) that is later interpreted in software or converted to native code at runtime (viaJIT compilation).
Transpiled
Code may be translated into source code of another language (typically lower-level) for which a compiler or interpreter is available.JavaScript and theC are common targets for such translators. For example, C and C++ code can be seen as generated from Eiffel code when using theEiffelStudio IDE. In Eiffel, thetranslated process is referred to astranscompiling ortranscompiled, and the Eiffel compiler as a transcompiler orsource-to-source compiler.
Software interpreted
Asoftware interpreter performs the actions encoded in source code without generating native machine code.
Hardware interpreted
Although uncommon, a processor with ahigh-level language computer architecture can process a high-level language without a compilation step. For example, theBurroughs large systems were target machines forALGOL 60.[8]

Note that a language is not strictly interpreted or compiled. Rather, an execution model involves a compiler or an interpreter and the same language might be used with different execution models. For example,ALGOL 60 andFortran 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 aJava virtual machine (JVM) or JIT compiled.

See also

[edit]

References

[edit]
  1. ^"HThreads - RD Glossary". Archived fromthe original on 26 August 2007.
  2. ^Surana P (2006)."Meta-Compilation of Language Abstractions"(PDF).Archived(PDF) from the original on 17 February 2015. Retrieved17 March 2008.{{cite journal}}:Cite journal requires|journal= (help)
  3. ^Kuketayev, Argyn."The Data Abstraction Penalty (DAP) Benchmark for Small Objects in Java".Application Development Trends. Archived fromthe original on 11 January 2009. Retrieved17 March 2008.
  4. ^Chatzigeorgiou; Stephanides (2002). "Evaluating Performance and Power Of Object-Oriented Vs. Procedural Programming Languages". In Blieberger; Strohmeier (eds.).Proceedings - 7th International Conference on Reliable Software Technologies - Ada-Europe'2002. Springer. p. 367.
  5. ^Manuel Carro; José F. Morales; Henk L. Muller; G. Puebla; M. Hermenegildo (2006)."High-level languages for small devices: a case study"(PDF).Proceedings of the 2006 International Conference on Compilers, Architecture and Synthesis for Embedded Systems. ACM.
  6. ^Kernighan, Brian W.; Ritchie, Dennis M. (1988).The C Programming Language: 2nd Edition. Prentice Hall.ISBN 9780131103627. Archived from the original on 25 October 2022. Retrieved25 October 2022.{{cite book}}: CS1 maint: bot: original URL status unknown (link)
  7. ^Hyde, Randall. (2010).The art of assembly language (2nd ed.). San Francisco: No Starch Press.ISBN 9781593273019.OCLC 635507601.
  8. ^Chu, Yaohan (1975), "Concepts of High-Level Language Computer Architecture",High-Level Language Computer Architecture, Elsevier, pp. 1–14,doi:10.1016/b978-0-12-174150-1.50007-0,ISBN 9780121741501

External links

[edit]
Level
Generation
International
National
Other
Retrieved from "https://en.wikipedia.org/w/index.php?title=High-level_programming_language&oldid=1321696146"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp