Eli5 why are there so many computer languages?

1.33K views

Why are there things like c++ and python when computers have to be programmed. Why does there need to be so many languages when one could solve it?

In: 222

64 Answers

Anonymous 0 Comments

I would say it’s because most/all programmers realise that computer programming is really maths, and good maths is something that feels pure to people who understand it…

For example, Einstein’s famous equation, e=mc², is wonderfully simple, but gives a massive insight into so much physics.

As programmers we feel we are scratching the surface of something that will be obvious once we have the right language for it, so we keep trying again to find the right one.

A bit deep perhaps, but also maybe true 🙂

Anonymous 0 Comments

Generally, the newer languages are easier to write code in / have less things for a developer to worry about. This usually comes at a performance cost, and newer languages have less cumulative time to weed out bugs in the language itself. So older languages are used in mission critical applications and where high performance is more important than ease/speed of development.

There are so many newer languages because different people have competing ideas about what makes a language easier to use/faster to develop in and what tradeoffs are acceptable to achieve that.

There are also some languages that are written to make a specific task easier to do, but aren’t really useful in general applications. And languages which are considered teaching languages which are intentionally more difficult to develop in because they expose the underlying concepts of computer science better.

Credentials: Staff Software Engineer with 25+ years code writing experience in over a dozen languages.

Anonymous 0 Comments

Because some languages are made to make certain things easier with sacrificing something.
If it’s fast then its often sacrificing on easy and simple to program. For example assembly is pretty much like machin code. But it takes many many lines to do a simple loop.

If it’s easy to learn and use its likely using libraries and other things that makes the code take up more space and is slower than assembly.

Then theres very easy languages but often they aren’t actually programming but rather scripting. Like python. That requires software to run it. But it’s relative slow compared to actual programming languages. But it’s easy to program and with vast libraries it makes most things easy to alter.

So the quick answer is that there’s tradeoff with the different languages depending on what they are used for.

Anonymous 0 Comments

Because each one has a different purpose, or because some don’t fit a particular need so a new competing one is made, or because [making them is fun](https://toylang.com/).

Fun fact about lua, which might be bullshit but I like a good story:

When brazil was cut off due to sanctions, someone had to develop a new programming language without outside influence. When the sanctions were dropped, the world was finally introduced to lua properly.

So lua was developed in isolation from conventional wisdom, which is likely why it’s so odd.

Anonymous 0 Comments

Some languages were invented just to teach beginners (BASIC and Pascal). Some were made as improvements to an existing language (C++, C#, and so on). Some were made for an entirely different paradigm (lisp). And some were made just to troll (INTERCAL).

Anonymous 0 Comments

There doesn’t have to be. It’s largely that the computer field has been largely unregulated and standardized, so everyone just does whatever they want.

There are some languages that are better for different use-cases.

Like C/C++ are good for low-level programming that talks directly to hardware.

Java/C# are good for high level application programming.

Python is good for higher level scripting.

Personally, as a developer, I do get frustrated when people start new languages that don’t have a ‘significant’ change from an existing language. They could definitely build on an existing language. It’s not just developers that need to learn the new language. It’s the whole tool chain that often needs changing and updating from build tools, security scanning tools…

But the answer to you question is really that the field is largely unregulated and not standardized. Any random developer can start a new programming language and maybe it catches on. Also some companies start their own language because then it locks users into their ecosystem.

Anonymous 0 Comments

Generally, the newer languages are easier to write code in / have less things for a developer to worry about. This usually comes at a performance cost, and newer languages have less cumulative time to weed out bugs in the language itself. So older languages are used in mission critical applications and where high performance is more important than ease/speed of development.

There are so many newer languages because different people have competing ideas about what makes a language easier to use/faster to develop in and what tradeoffs are acceptable to achieve that.

There are also some languages that are written to make a specific task easier to do, but aren’t really useful in general applications. And languages which are considered teaching languages which are intentionally more difficult to develop in because they expose the underlying concepts of computer science better.

Credentials: Staff Software Engineer with 25+ years code writing experience in over a dozen languages.

Anonymous 0 Comments

About 40 years ago the US Department of Defense completed a project to define Ada, the one computer programming language to rule them all. It had everything that could ever possibly be needed, Algol-like program structure with compile time generated type checking, complex type definitions with bit perfect representations in memory so that hardware interface code could be written. Even multi-threading was built in to that language using a memory safe mechanism for exchanging data between threads that the design team called ‘rendezvous’.

The only thing it didn’t have hadn’t been invented yet, a new idea called Object Oriented Programming that encapsulated data and code into a common unit all tied together by a single reference that was being experimented with by Alan Kay’s team at Xerox. Those ideas eventually changed all modern computer programming languages, but poor Ada, designed by committee and slow to respond to new ideas never managed to incorporate OO. A little bit of syntactic sugar was added in 1995 to allow a similar syntax to be used to that of C++ when it invokes and object method, but the other features of OO, or more recently Aspect Oriented programming were never added.

And that is really the main problem with universal programming languages. New ideas sprout up all the time, and experimenting with those ideas requires a new language to express them in. Purely declarative languages like HTML and SQL have very different structure from imperative languages like C++ or Python, and that is good because it lets us reframe our way of thinking about a problem.

Anonymous 0 Comments

Because some languages are made to make certain things easier with sacrificing something.
If it’s fast then its often sacrificing on easy and simple to program. For example assembly is pretty much like machin code. But it takes many many lines to do a simple loop.

If it’s easy to learn and use its likely using libraries and other things that makes the code take up more space and is slower than assembly.

Then theres very easy languages but often they aren’t actually programming but rather scripting. Like python. That requires software to run it. But it’s relative slow compared to actual programming languages. But it’s easy to program and with vast libraries it makes most things easy to alter.

So the quick answer is that there’s tradeoff with the different languages depending on what they are used for.

Anonymous 0 Comments

I would say it’s because most/all programmers realise that computer programming is really maths, and good maths is something that feels pure to people who understand it…

For example, Einstein’s famous equation, e=mc², is wonderfully simple, but gives a massive insight into so much physics.

As programmers we feel we are scratching the surface of something that will be obvious once we have the right language for it, so we keep trying again to find the right one.

A bit deep perhaps, but also maybe true 🙂