Why are there so many computer programming languages?

by AndHankMardukas
HappyAtavism

There are many reasons.

First, in the early days of programming languages, the technology was new and people weren't sure how to, or necessarily even appreciate the desirability of creating, general purpose languages. So they created a variety of specialized languages, such as:

Fortran = Formula Translation (1957), meant for numerical programs (science, engineering, etc.)

COBOL = COmmon Business Oriented Language (1960), for business applications (payroll, inventory, etc.)

SNOBOL = StriNg Oriented and symBOlic Language (1962), for manipulating strings and text

Lisp = LISt Processing (1958), for AI (Artificial Intelligence). Proponents will say it's also useful for general purpose applications, but it never became wildly popular for that.

The dates are for when the languages were first introduced. Popular languages continue to be revised over decades. Also, I'm only listing some well known languages that caught on, there are many, such as Autocode and FLOW-MATIC, that never caught on, but implemented ideas that were later adopted by more popular languages.

All of the languages listed above (except SNOBOL) are still in wide use, which is another reason there are so many languages. Once a language becomes widely used it never dies. It may slowly fade away, but only very very slowly. So you get new languages, but don't loose the old ones.

Later on in the 1960's you see more work being done on more general purpose languages, such as PL/1 (Programming Language One, 1964). Ease of use is also another goal, albeit with a sacrifice in speed, such as APL (A Programming Language, meant for math, 1964) and BASIC (Beginner's All-purpose Symbolic Instruction Code, meant for teaching, 1964).

Various languages have also been written because they include new programming ideas. Examples include Simula (object-oriented, 1967) and ML (functional programming, 1973). Later other languages built on these, (hopefully) including improvements. Java is an example of an improved object oriented language.

The languages I mentioned in the previous paragraph are meant to be useful in the real world, but many languages are developed to experiment with just one or two new ideas, with no intention of ever making them more popular. This is typically done in an experimental environment like academia. You'll sometimes hear lines like "there are over 2000 programming languages", which may be true (it's hard to get an accurate count) but many of them fall into this sort of category. The number widely used in practice, while there are still many, may be a few dozen (absolutely impossible to get a real count, due to endless debate and the difficulty of defining "widely used").

Lastly, many programmers consider creating new languages to be fun (that also explains why programmers are rarely invited to parties). A number of languages, such as Perl (1987) and Python (1991) fall into this category. Even though they may start as hobby projects, some of them become popular because they're useful.

Sources:

Sammet, Programming Languages: History and Future

Association for Computing Machinery, History of Programming Languages Conferences

P.S. Beware getting involved in discussions of which programming language(s) are better and worse. These are called "language wars", and involve rhetoric that makes the Wars of the Reformation seem civil.