A programming language is a constructed language, as opposed to natural languages likes English and Mandarin, which is designed as a middleman between the human programmer who inputs the code and the machine that only understands low-level assembly language (which is then further broken down until ultimately being 1s and 0s). The code that a programmer types is bound by rules known as syntax, not entirely unlike the grammar of a natural language. There are significant differences in the underlying philosophies and architectures of these languages, yet their syntactic differences are generally not enough to make one completely incomprehensible to a programmer trained in another. See the examples of variable declaration and initialization statements below:
|Programming language||How to declare an integer variable and assign it the value of 5|
|C||int foo = 5;|
|Java||int foo = 5;|
|Python||foo = 5|
|Perl||my $foo = 5;|
|MATLAB||foo = 5;|
|FORTRAN||INTEGER foo = 5|
|PHP||$foo = 5;|
'foo' and 'bar' are common metasyntactic placeholders in example code from the programming community
Previously, procedural languages like C reflected the predominant industry paradigm but over the past decade there has been a definite shift toward object-orientated programming. Most modern languages at least support object-orientated programming - several to the exclusion of all else. However, both paradigms share the fundamental need to express algorithms in their languages, using loops, functions and variables. Most of the most popular languages in use today - C(++), Java, etc. - are general-purpose, but some equally successful ones in their specific fields were designed with narrower purposes, such as MATLAB and SQL which are for numerical operations and database management respectively. The majority of computer programming languages are entirely textual, though some, such as Visual Basic, have a graphical component.
The idea of a programming language actually pre-dates computers themselves - the technology was initially thought up to direct the behavior of Jacquard looms, player pianos and similar machines. However, the first computer programmer is generally considered to be Ada Lovelace who wrote the first algorithm ever intended to be carried out by a machine in 1842. It was designed for Charles Babbage's Analytical Engine. The first true programming languages were the assembly codes of 1940s computers.
First computer ever invented. Image credit: Anasalialmalla© BrainMass Inc. brainmass.com March 31, 2023, 5:08 am ad1c9bdddf