However, computers do exactly what they are told to do, and cannot understand the code the programmer "intended" to write. When using a natural language to communicate with other people, human authors and speakers can be ambiguous and make small errors, and still expect their intent to be understood. As such, programming languages differ from most other forms of human expression in that they require a greater degree of precision and completeness. It is a usual approach to embed a programming language into the non-computational (host) language, to express templates for the host language.Ī prominent purpose of programming languages is to provide instructions to a computer. Non-computational languages, such as markup languages like HTML or formal grammars like BNF, are usually not considered programming languages. ANSI/ISO SQL and Charity are examples of languages that are not Turing complete yet often called programming languages. All Turing complete languages can implement the same set of algorithms. Expressive power: The theory of computation classifies languages by the computations they can express (see Chomsky hierarchy).Constructs: Programming languages may contain constructs for defining and manipulating data structures or for controlling the flow of execution.
In some cases, programming languages are used by one program or machine to program another PostScript source code, for example, is frequently generated programmatically to control a computer printer or display. Target: Programming languages differ from natural languages in that natural languages are only used for interaction between people, while programming languages also allow humans to communicate instructions to machines.Function: A programming language is a language used to write computer programs, which instruct a computer to perform some kind of computation, and/or organize the flow of control between external devices (such as a printer, a robot, or any peripheral).Thousands of different programming languages have been created, and new ones are created every year.Īuthors disagree on the precise definition, but traits often considered important requirements and objectives of the language to be characterized as a programming language:
Some authors restrict the term "programming language" to those languages that can express all possible algorithms sometimes the term " computer language" is used for more limited artificial languages. Programming languages are used to facilitate communication about the task of organizing and manipulating information, and to express algorithms precisely. Programming languages, like human languages, are defined through the use of syntactic and semantic rules, to determine structure and meaning respectively. Related subjects: Computer ProgrammingĪ programming language is an artificial language that can be used to control the behaviour of a machine, particularly a computer.