High-level programming language: Difference between revisions

Content deleted Content added
Relative meaning: There are zillions of high-level language; no point trying at all to list them
Relative meaning: Edit for brevity and accuracy and uniformity
Line 57:
{{refimprove section|date=October 2018}}
 
The terms ''high-level'' and ''low-level'' are inherently relative, and languages can be compared as higher or lower level to each other. Sometimes the [[C (programming language)|C 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.
The terms ''high-level'' and ''low-level'' are inherently relative. Some decades ago,{{clarify timeframe|date=July 2023}} the [[C (programming language)|C language]], and similar languages, were most often considered "high-level", as it supported concepts such as expression evaluation, [[parameter]]ised recursive functions, and data types and structures, while [[assembly language]] was considered "low-level". Today, many programmers might refer to C as low-level, as it lacks a large [[Runtime system|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]]s and [[microcontroller]]s. Also, in the introduction chapter of [[The C Programming Language]] (second edition) by [[Brian Kernighan]] and [[Dennis Ritchie]], C is described as "not a very high level" language.<ref>{{cite book|last1=Kernighan|first1=Brian W.|last2=Ritchie|first2=Dennis M.|date=1988|title=The C Programming Language: 2nd Edition|url=https://books.google.com/books?id=FGkPBQAAQBAJ|url-status=bot: unknown|publisher=Prentice Hall|isbn=9780131103627|archive-url=https://web.archive.org/web/20221025180501/https://books.google.com/books?id=FGkPBQAAQBAJ|archive-date=25 October 2022|access-date=25 October 2022}}</ref>
 
The terms ''high-level'' and ''low-level'' are inherently relative. Some decades ago,{{clarify timeframe|date=July 2023}} the [[C (programming language)|C language]], and similar languages, were most often considered "high-level", as it supportedsupports conceptsconstructs such as expression evaluation, [[parameter |parameterized]]ised and recursive functions, and data types and structures, whilewhich [[assemblyare language]]generally wasnot consideredsupported "low-level".in Today,assembly manyor programmersdirectly mightby refera toprocessor but C asdoes provide lowlower-level, asfeatures itsuch lacksas a large [[Runtime system|runtimeauto-system]]increment (noand garbagepointer collection, etcmath.), basicallyBut supportsC onlylacks scalarmany operations,higher-level andabstracts providescommon directin memoryother addressing;languages itsuch therefore,as readily[[garbage blends with assembly languagecollection]] and thea machinebuilt-in levelstring of [[CPU]]s and [[microcontroller]]stype. Also, inIn the introduction chapter of [[The C Programming Language]] (second edition) by [[Brian Kernighan]] and [[Dennis Ritchie]], C is described as "not a very high level" language.<ref>{{cite book|last1=Kernighan|first1=Brian W.|last2=Ritchie|first2=Dennis M.|date=1988|title=The C Programming Language: 2nd Edition|url=https://books.google.com/books?id=FGkPBQAAQBAJ|url-status=bot: unknown|publisher=Prentice Hall|isbn=9780131103627|archive-url=https://web.archive.org/web/20221025180501/https://books.google.com/books?id=FGkPBQAAQBAJ|archive-date=25 October 2022|access-date=25 October 2022}}</ref>
Assembly language may itself be regarded as a higher level (but often still one-to-one if used without [[Macro (computer science)|macro]]s) representation of [[machine code]], as it supports concepts such as constants and (limited) expressions, sometimes even variables, procedures, and [[data structure]]s. [[Machine code]], in turn, is inherently at a slightly higher level than the [[microcode]] or [[micro-operation]]s used internally in many processors.<ref>{{Cite book|title=The art of assembly language|last=Hyde, Randall.|date=2010|publisher=No Starch Press|isbn=9781593273019|edition= 2nd|___location=San Francisco|oclc=635507601|url=https://books.google.com/books?id=sYHtTvQ-ObIC}}</ref>
 
Assembly language is higher-level than machine code, but still highly tied to the processor hardware. But, assembly may provide some higher-level features such as [[Macro (computer science)|macro]]s, relatively limited expressions, constants, variables, procedures, and [[data structure]]s.
 
Assembly language may itself be regarded as a higher level (but often still one-to-one if used without [[Macro (computer science)|macro]]s) representation of [[machine code]], as it supports concepts such as constants and (limited) expressions, sometimes even variables, procedures, and [[data structure]]s. [[Machine code]], in turn, is inherently at a slightly higher level abstraction than the [[microcode]] or [[micro-operation]]s used internally in many processors.<ref>{{Cite book|title=The art of assembly language|last=Hyde, Randall.|date=2010|publisher=No Starch Press|isbn=9781593273019|edition= 2nd|___location=San Francisco|oclc=635507601|url=https://books.google.com/books?id=sYHtTvQ-ObIC}}</ref>
 
== Execution modes ==