Eli5 why are there so many computer languages?

1.40K 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

Let’s answer your question with a joke.

**There are 40 competing standards.**
– Why are people using so many different standards? I’ll create a universal standard that will solve everything!

**…There are 41 competing standards**

Anonymous 0 Comments

One could not solve it.

Software dev here. Not all languages are on the same level. There are languages that are lower level languages closer to machine code (think binary). And there are upper level languages that build on the bottom ones to be more human friendly and readable. Generally lower level languages can be more efficient to run. But high level languages are easier to produce and iterate.

Even if you made a universal language, you’d still need a handful. And you’d have to shut the entire world down for years to update everything.

But the real reason? Someone can always make it better. And as needs evolve rapidly, so do 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

Programs do a lot of different things, it is one of the reasons I am not afraid of software developers being laid off en masse because of ChatGPT, software development is about more than just coding. Depending on what you are doing, one programming language and paradigm might be better than the other. You might write scalable API calls with GO. You might write a website in Javascript that calls python programs to do things the user wants.

Imagine a computer program is actually a motor pool. Your computer program / motor pool is tasked with several responsibilities. You need to transport VIPs, you need to be able to recover vehicles that have slid off the road in bad weather, you need to transport 20 or more people in one vehicle, and you need to transport loads of dirt from site A to site B.

Each car that you acquire is built with a different language. You might have a limousine, a bus, a wrecker, and a dump truck. While they are all fall under the general class of ‘vehicle’, you wouldn’t build a dump tuck with parts that work best on limousines. Computer programming is similar to that, you might build an application that can do some task, but once you hit it with 100,000 concurrent connections it won’t work correctly. Like, your limo can transport 6-8 people but if you cram 20 people into it you will quickly discover problems.

Anonymous 0 Comments

I don’t think it has to do with some being better than others at different tasks. While it’s true that they are to some extent, many languages are interchangeable for many situations, and only exist because someone wanted to design a new language and it caught on. The state of backend web development has gotten absurd–PHP, Node (with or without TypeScript), Java, Python, golang, Ruby, C#, etc. Languages tend to evolve toward being object-oriented, strictly typed, and having block scope. Some started off that way, like Java, while others ended up there, like PHP and Node (with the creation of TypeScript). This is a terrible state of affairs compared to merely using JavaScript on the front-end, even though JavaScript was a pretty bad language to begin with (no block scope, overloaded + operator which does either addition or concatenation depending on the types of variables in a language that supposedly does implicit type conversation, inability to type multi-line strings in the code). Having everyone use the same language, even a sub-par one, would be a step up from having a dozen different popular languages, even if some are marginally better than others at particular things.

Anonymous 0 Comments

Part of it is because different languages can be more computer friendly or programmer friendly: assembly (more computer friendly), C, C++, python (more programmer friendly). So you can pick the language based on how much performance is needed vs how long can you spend coding it.

Also, some languages are specialized: matlab for calculation, mathematica for symbolic math, java script for web programs, etc.

There are also many programming languages that serve the same function as another one, but have a different syntax. C++, go, rust for example. There isn’t a good reason for more than one to exist, but it’s simple enough to create one, than multiple people or organizations did it.

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

Improvement.

Over time, people discover problems in a programming language that they’re using, or they want to change it so it does something new or better. If the changes are significant enough, you call the result a “new” programming language..

That’s approximately the same thing that happens with cars: manufacturers make improvements and changes to older car models, to create new models.

But, unlike cars, you need the old programming language because there were programs written in it. And, although programming languages may become obsolete, they don’t fall apart like cars do. So, they tend to stick around for a lot longer than old cars.

Anonymous 0 Comments

Programs do a lot of different things, it is one of the reasons I am not afraid of software developers being laid off en masse because of ChatGPT, software development is about more than just coding. Depending on what you are doing, one programming language and paradigm might be better than the other. You might write scalable API calls with GO. You might write a website in Javascript that calls python programs to do things the user wants.

Imagine a computer program is actually a motor pool. Your computer program / motor pool is tasked with several responsibilities. You need to transport VIPs, you need to be able to recover vehicles that have slid off the road in bad weather, you need to transport 20 or more people in one vehicle, and you need to transport loads of dirt from site A to site B.

Each car that you acquire is built with a different language. You might have a limousine, a bus, a wrecker, and a dump truck. While they are all fall under the general class of ‘vehicle’, you wouldn’t build a dump tuck with parts that work best on limousines. Computer programming is similar to that, you might build an application that can do some task, but once you hit it with 100,000 concurrent connections it won’t work correctly. Like, your limo can transport 6-8 people but if you cram 20 people into it you will quickly discover problems.

Anonymous 0 Comments

Let’s answer your question with a joke.

**There are 40 competing standards.**
– Why are people using so many different standards? I’ll create a universal standard that will solve everything!

**…There are 41 competing standards**