The world is filled with things that have many different variations: word processors, cars, home designs, beverages, candy, pens, shovels, etc. The reasons why we have so many can be boiled down to a few principles:
- Someone thinks they can improve on existing products
- A different design is necessitated by local considerations (think: homes on stilts vs. homes on concrete slabs)
- A new category of product fills a need where none existed before
Walk into any office supply store and look at the "writing instrument" section -- there are hundreds of varieties of pens. They all do roughly the same thing: deliver ink to a writing surface. But each pen you see displayed for sale is there because one of the three reasons above.
- Cartridge fountain pens are an improvement on dipped fountain pens,
which are themselves an improvement on feather quills.
- NASA needed a
pen that could write in the absence of gravity, so the pressurized
rollerball pen was invented.
- The very first pen itself may well have
been a pointed stick dipped in tar or blood; prior to that people
were scraping rocks together or smearing pigments on walls with fur.
(Just a guess.)
The evolution of pens will continue since no one product fits the needs of every user. Some pens are cheap and disposable, some are expensive and built of high-quality materials; some use gels, some use ink, some use pigments; some have twist-off caps, some don't have caps at all; wide barrels, narrow barrels, round barrels, square barrels; short, long; red, white, black, blue. Etc, etc.
But enough about pens.
Our current myriad of programming languages can be traced back to the very first ones: the numeric machine codes for early computers back in the 1940s. Primitive, hard to use, and laborious to enter into the computer, but they did the job. It wasn't long after that programmers assigned mnemonic words (such as ADD, CALL, LOAD) to the machine codes, giving birth to the class of languages called "assembly languages."
Different processor architectures called for different mnemonic codes, depending on the specific features of the underlying machines. Taking these differences into account meant inventing different assembly languages.
(Perhaps by now you can see where this is going...)
Programmers looked at their assembly languages programs and saw patterns: the same sequences of instructions would be used to form loops, conditionals, variable assignment, function calls, and so forth. Thus, the procedural programming languages were born. These languages encapsulated groups of instructions under umbrella terms such as "if", "while", "let", etc.
Out of a mathematical analysis of computer programming came the functional languages -- a whole new way of looking at computation. Not better, not worse, just different.
And then there's object-oriented, statically typed, dynamically typed, late binding, early binding, low memory usage, high memory usage, parallelizable, languages for specific uses, and on and on.
Ultimately, we have different programming languages because we want different programming languages. Every language designer has their own ideas about how their "dream" language will look and operate. Diversity is a good thing.
4Why are there so many cars? Why are there so many airplanes? And what about BOATS! I mean, really! You go down to the ocean and there's, like, all KINDS of the dang things! What's the point of all those differents kinds of things?!?!? It's inefficient! It's wasteful!! And what is the freakin' point of all those different choices?!?!? Geez - wise up people! Nobody could possibly need anything except a Yugo, an F-150, and an ocean liner! Oh, yeah, planes - MD-80's'll work fine for just about everything. There. Now that that's all settled... :-) – Bob Jarvis - Reinstate Monica – 2016-02-16T03:05:10.540
2there is also a difference between OO and non-OO. Plus, some languages come with nice packages: R, Maple, Matlab, Mathematica that are often lacking from other languages. – Artem Kaznatcheev – 2012-03-17T06:30:15.230
The articles you added are certainly interesting, especially the point made in the second one that there is no scientific evidence that one programming language is better (in terms of productivity) than another. But as someone who regularly tries new programming languages, I cannot deny the convenience of the abstractions offered by more modern languages. In terms of research still to be done: sure, all the main fruits have been picked and the paradigms have been defined, but there is definitely more to do. – Dave Clarke – 2012-03-17T21:01:58.810
85http://i.stack.imgur.com/35yc5.png – Dai – 2012-03-17T06:32:09.957
5
Already ask on Programmers http://programmers.stackexchange.com/q/7551/45322
– alain.janinm – 2012-03-19T21:39:48.287Due to same reason for we have so many foods/drinks/cars around - one size doesn't fit all! – Raúl – 2017-10-13T05:03:33.097
Obligatory (but also illuminating) XKCD: https://xkcd.com/927/
– Syntax Junkie – 2019-11-21T18:05:40.733+1 for Saeed Amiri about functional programming. Functional programming paradaigm is used by many companies that focus mainly on high-speed programming as it is easier to optimize functional programs into multi processors. Should you use it ? not necessarily. A high level of expertise is needed to write large codes in a functional programming language. – AJed – 2013-05-12T23:24:02.250
I don't get how this is on-topic on CS.SE. – Lightness Races in Orbit – 2015-01-18T22:00:04.310
2
For implementing parallel algorithms, functional programming is better, in general when you have mutable objects, it's better to use OO paradigm, else (if you want deal with immutable objects) it's better change it to functional model. This scenario widely exists in parallel processing. Also some of excellent OO patterns, like fluent interface and method chaining are working like functional paradigm.
– None – 2012-08-20T00:16:22.2401@alain.janinm, Why is that exact same question closed on programmers.SE when it's actually more on-topic there? – Pacerier – 2015-09-01T12:10:55.800