A programming language is a notation system for writing computer programs. Most programming languages are formal, text-based languages, but they may also be graphical. It is a type of computer language.
The description of a programming language is usually divided into two components: syntax (form) and semantics (meaning), which are usually defined by a formal language. Some languages are defined by specification documents (for example, the C programming language is defined by the ISO standard), while other languages (such as Perl) have a dominant implementation that is considered a reference. Some languages have both, with the base language being determined by the standard and extensions coming from the most common implementation
Programming language theory is a branch of computer science that studies the design, implementation, analysis, description and classification of programming languages
Computer languages versus programming languages
The term computer language is sometimes used instead of programming language. However, the usage of these two terms varies between authors, including the scope of each term. One application describes programming languages as part of computer languages. Likewise, languages used in computing that have a purpose other than expressing computer programs are generally called computer languages. For example, markup languages are sometimes referred to as computer languages to emphasize that they are not intended for use in programming
One way to classify computer languages is the computations they can express, as described in computational theory. Most practical programming languages are Turing complete and all Turing complete languages can implement a set of algorithms. ANSI/ISO SQL-92 and Charity are examples of languages that are not Turing-complete, but are often called programming languages. However, some authors limit the term “programming language” to Turing complete languages
Other uses consider programming languages as theoretical constructs for programming abstract machines, and computer languages as part of those languages that run on physical computers that have limited hardware resources. John C. Reynolds emphasizes that a formal specification language is a programming language just like an implementation language
He also saw that textual and even graphical input formats that affect computer behavior are programming languages, although they are usually not Turing-complete, and that ignoring the concept of programming languages is the cause of many input weaknesses. Formats
Scope and purpose
In most practical contexts, programming languages involve computers. Therefore, programming languages are usually defined and studied in this way
Programming languages are different from natural languages, natural languages are only used for interaction between humans, while programming languages allow humans to communicate instructions to machines
The scope of the language is also worth considering. Markup languages such as XML, HTML, or troff that define structured data are not usually considered programming languages
However, programming languages can share syntax with markup languages if semantics are defined. For example, XSLT is a Turing-complete language that uses fully XML syntax. Additionally, LaTeX, which is mostly used for organizing documents, includes a Turing-complete subset
Abstractions
Programming languages typically contain abstractions to define and manipulate data structures or control the flow of execution. The practical necessity that programming languages support sufficient abstraction is expressed by the abstraction principle
Early development
Very early computers, such as Colossus, were programmed without the aid of stored programs, by modifying their own circuits or arranging a set of physical controls
Soon after, programs could be written in machine language, where the programmer digitally wrote down any instructions that could be executed directly by the machine. For example, an instruction to add values to two memory locations might contain 3 numbers
An “opcode” that defines the “add” operation and two memory locations. Programs are read in decimal or binary form from punched cards, paper tape, magnetic tape, or actuated switches on the computer’s front panel. Then the machine language was called the first generation (مجتمع فنی تهران) programming language