| Line 1: |
Line 1: |
| − | A '''programming language''' is an artificial [[language]] used mainly for giving instructions to [[computer]]s; a secondary use is for the precise specification of [[algorithm]]s. A group of instructions for a particular purpose is known as a [[computer program]]. | + | A '''programming language''' is used mainly for giving instructions to [[computer]]s. A group of instructions for a particular purpose is known as a [[computer program]]. |
| | | | |
| | When compared with human languages (e.g. English, French, Spanish, etc.), programming languages are very much smaller, much simpler, and are also more precise. Most programming languages consist of a mixture of English words and mathematical notation; very few programming languages have a base vocabulary exceeding 60 words, although they may also have utility libraries with hundreds of entries which provide optional extra functionality. | | When compared with human languages (e.g. English, French, Spanish, etc.), programming languages are very much smaller, much simpler, and are also more precise. Most programming languages consist of a mixture of English words and mathematical notation; very few programming languages have a base vocabulary exceeding 60 words, although they may also have utility libraries with hundreds of entries which provide optional extra functionality. |
| | | | |
| − | Many thousands of different programming languages have been defined, though only a few dozen are in widespread use. The first publicly available programming language was A-0, developed in 1951 by Grace Hopper. In 1948 Zuse published a paper (in "Archiv der Mathematik") about an early programming language Plankalkül, though this was not actually implemented until 1998. | + | Many thousands of different programming languages have been defined, though only a few dozen are in widespread use. The first publicly available programming language was developed in 1951 by [[Grace Hopper]]. In 1948 Zuse published a paper (in "Archiv der Mathematik") about an early programming language Plankalkül, though this was not actually implemented until 1998. |
| | | | |
| | ==Describing a programming language== | | ==Describing a programming language== |
| Line 10: |
Line 10: |
| | The meaning or [[semantics]] of any particular construct in a programming language is most commonly described in fairly precise English. Several unsuccessful attempts have been made to find a useful and formal way of describing the semantics. | | The meaning or [[semantics]] of any particular construct in a programming language is most commonly described in fairly precise English. Several unsuccessful attempts have been made to find a useful and formal way of describing the semantics. |
| | | | |
| − | The more important programming languages have an internationally-agreed official standard (ISO is the international standards organisation, ANSI is the standards body in the United States). In theory, programs which conform to the relevant standard should be usable on most types of computer; this works in practice most of the time, provided that the programmers have been careful to avoid machine-dependencies. Such agreed standards are usually revised every 5 to 15 years, often with new features being added, and sometimes with old features being either removed or marked as obsolete. | + | The more important programming languages have an internationally-agreed official standard (ISO is the international standards organisation, ANSI is the standards body in the United States). In theory, programs which conform to the relevant standard should be usable on most types of computer; this works in practice most of the time, provided that the programmers have been careful to avoid machine dependencies. Such agreed standards are usually revised every 5 to 15 years, often with new features being added, and sometimes with old features being either removed or marked as obsolete. |
| | | | |
| | Very few programmers learn a programming language directly from the formal definition, which exists primarily as a reference which can be consulted in cases of doubt. There are usually plenty of books and training courses for the more common programming languages. | | Very few programmers learn a programming language directly from the formal definition, which exists primarily as a reference which can be consulted in cases of doubt. There are usually plenty of books and training courses for the more common programming languages. |
| Line 37: |
Line 37: |
| | Early high-level programming languages were often intended for use in a particular problem domain (e.g. COBOL for business purposes, Fortran and Algol 60 for scientific calculations). Other programming languages were originally intended for teaching purposes (e.g. BASIC and Pascal). The language '''C''' was originally intended for systems programming (writing operating systems and compilers). | | Early high-level programming languages were often intended for use in a particular problem domain (e.g. COBOL for business purposes, Fortran and Algol 60 for scientific calculations). Other programming languages were originally intended for teaching purposes (e.g. BASIC and Pascal). The language '''C''' was originally intended for systems programming (writing operating systems and compilers). |
| | | | |
| − | Successful programming languages evolve over time to become more general-purpose, or form the basis for other languages (e.g. '''C''' -> '''C++'''). The evolution often involves incorporating good features from other languages. The general trend is for languages to become more general-purpose and provide more levels of abstraction. The concepts of structured programming were put on a sound theoretical basis in the early 1970's and these have also influenced the evolution of some programming languages (e.g. Fortran 66 -> Fortran 77). The idea of objects (combining data with the applicable operations) was available in Simula in the mid 1960's, but did not become popular until the advent of C++ in the early 1980's and Java in the mid 1990's; confusingly, Java and C++ have a lot of syntax in common, but the meaning (semantics) may differ drastically for what looks the same when written down. | + | Successful programming languages evolve over time to become more general-purpose, or form the basis for other languages (e.g., A-0 spawned B, which led to '''C''' -> '''C++''' '''C#'''). The evolution often involves incorporating good features from other languages. The general trend is for languages to become more general-purpose and provide more levels of abstraction. The concepts of structured programming were put on a sound theoretical basis in the early 1970's and these have also influenced the evolution of some programming languages (e.g. Fortran 66 -> Fortran 77). The idea of objects (combining data with the applicable operations) was available in Simula in the mid 1960's, but did not become popular until the advent of C++ in the early 1980's and Java in the mid 1990's; confusingly, Java and C++ have a lot of syntax in common, but the meaning (semantics) may differ drastically for what looks the same when written down. |
| | | | |
| | There are a variety of different programming paradigms (styles of writing programs). Some programming languages really only support a single paradigm while others may support several. Declarative programming has already been mentioned above. Other paradigms include: procedural, functional, event-driven, object-oriented and automata-based. | | There are a variety of different programming paradigms (styles of writing programs). Some programming languages really only support a single paradigm while others may support several. Declarative programming has already been mentioned above. Other paradigms include: procedural, functional, event-driven, object-oriented and automata-based. |