High-level programming language: Difference between revisions

Content deleted Content added
m Reverted edit by Pritviraj Mahata (talk) to last version by CrafterNova
changed unreferenced tags to refimprove; tagged with clarify timeframe + copy edit
Line 54:
 
== Relative meaning ==
{{unreferencedrefimprove section|small=y|date=October 2018}}
Examples of high-level programming languages in active use today include [[Python (programming language)|Python]], [[JavaScript]], [[Visual Basic]], [[Delphi (programming language)|Delphi]], [[Perl]], [[PHP]], [[ECMAScript]], [[Ruby (programming language)|Ruby]], [[C Sharp (programming language)|C#]], [[Java (programming language)|Java]] and many others.
 
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 [[Run time system|runtime]]-system (no garbage collection, etc.), basically supports only scalar operations, and provides direct memory addressing.; It,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 K&R, C is considered as a relatively "low 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=live|publisher=Prentice Hall|isbn=9780131103627|archive-url=https://archive.org/details/the_c_programming_language_2_20181213|archive-date=2018-12-13}}</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 its 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>
 
== Execution modes ==
{{unreferencedrefimprove section|smallfind=yExecution modes|date=October 2018}}
There are three general modes of execution for modern high-level languages:
; Interpreted: When code written in a language is [[Interpreted language|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.