Why does there need to be so many computer programming languages? Why is one not enough?


Why does there need to be so many computer programming languages? Why is one not enough?

In: 2084

Aside from the fact that there are many specializations that certain languages are made to fit (for example, the way C++ and Java manages memory is wildly different, and it shows all over the language design and the standard libraries), if you gather four random programmers, you’ll get about six opinions on which that “one language” should be, and you will probably need to keep sharp or heavy objects away from them if you ask the question with all of them in the same room.

There’s an XKCD for everything, including this: https://xkcd.com/927/

Basically different languages do have specializations and advantages/disadvantages but a lot of it comes down to opinion or what people are used to. So when somebody has an idea of a new language that is “better” than all the existing ones, not everybody will agree and even if they see the advantages of the new language they may not be willing or able to relearn to work with the new language, or rewrite existing software, so the old languages will largely still stick around.

Why do we need so many knives? Is one not enough?

There’s a knife focused on cutting fish, one for red meat, one for bones, one for leaves on a tree, one for cloth, one for surgery, etc, etc.

Same thing with programming languages. There’s a fast to write one, there’s a fast to run one, there’s a really secure one, etc, etc.

Because languages are developed to serve specific purposes. Very few languages are truly all-purpose, and even then you might be better served with a language that serves your needs specifically.

So, the same reason why there are dozens of tools in a toolbox.

Some languages make it easy to do complicated math. Some languages make it easy to make web pages or games. Some languages work well on tiny chips like old solar powered calculators. Some languages work well on super computers in the cloud. It would be hard to make a language that was good at everything.

Imagine trying to make the perfect hammer. Some hammers are good for banging in nails, some are good for knocking down a concrete wall.