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

428 views

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

In: 2084

12 Answers

Anonymous 0 Comments

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.

Anonymous 0 Comments

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.

Anonymous 0 Comments

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.

Anonymous 0 Comments

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.

Anonymous 0 Comments

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.

Anonymous 0 Comments

Functionality and purpose have a large role to play. Many people think of programming languages ranging between Assembly, C, Basic, Java, and Python for computing tasks, but there’s also the languages used in robotics and CNC machines (G-code frequently). The languages used to create useful applications and graphics don’t necessarily have great features for commanding motion from physical components: such cross-compatibility would unnecessarily bloat any universal programming language, and require greater training to use.

Anonymous 0 Comments

Imagine wanting to ask someone to wash the dishes.

A very high level language like Python might just be like simply saying “Hey, can you wash the dishes?”, and then they wash the dishes the best way they know.

On the other hand, a very low level language like assembly (which is not a single language, there are many assembly languages) would be like giving an extremely detailed list of instructions- maybe some of the dishes need to be soaked, you have to clean the cast iron skillet differently, stainless steel should be completely hand washed and not go into the dishwasher, some should be washed with cold and some with hot etc.

With some tasks, maybe it’s not important that you control exactly how they’re done, so in that case you might just tell them the first way to save time on the instruction telling, but if it’s important to do it a specific way or if it it saves time if you give them more detailed steps, you might pick the second option. There’s always a trade off going on between how fast you can write the code/how easily you can learn it and how much exact control you have over what it does.

Anonymous 0 Comments

A lot of answers are getting at the fact that programming languages do things differently, but, the truth is, basically all languages can (theoretically) do what any other language can (this is a concept known as Turing Completeness in Computer Science). A better way to see this might be to consider *trade-offs*. So, with that in mind

C and C++:

Pro:
Blazing fast, the choice for programmers if you want to write code that needs to run pronto. Think of trading systems, or databases.

Cons:
Notoriously easy to make mistakes that don’t get caught easily, that can cause devastating bugs. Also not the easiest languages to pick up or master.

Rust:

Pro:
C/C++ speeds with exceptional safety

Con:
Arguably the most tedious high-level language. Writing it can be a proper chore.

Java:

Pro:
Reasonably fast, scales very well, super easy to hire for because everyone and their mom knows Java. Also has a really good ecosystem, so you have libraries for everything.

Con:
Java has evolved over time, so a lot of things you would expect a language to have were added rather retroactively to Java, which makes it notoriously verbose and kinda clunky to work with.

Javascript (not to be confused with Java, 2 totally separate languages):

Pro:
Jack-of-all-trades. If you want to make a production grade product today and only want to learn 1 language, JS will be your choice. You can make apps for iOS and Android, a proper front-end, and a reasonable back-end, all in JS.

Con:
Not really the best at anything other than designing websites. If you want your app or backend to be fast, you probably should consider alternatives. Also, notoriously inconsistent behaviour – a lot of things that you expect should be one way are not at all how they are. An analogy might be the common posts about how the plural of goose is geese, but plural of moose is not meese – inconsistent behaviour.

Python:

Pro:
Far and away the easiest language to write. Excellent resources if you need ready-made blocks of code. The language of choice if you just want to write code for something quick and dirty.

Con:
Slow as hell.

All other languages will fall somewhere on these continuums, but I figured I’ll be getting into a rambly amount of detail if I started bringing those up.

Anonymous 0 Comments

Why does there need to be so many car models? Why is one not enough?

You see, every car has its special purpose. Some drive well on rough roads, some drive well on a race track, some drive well on a city road, some are comfortable beyond measure, some are uncomfortable but get the job done, some are cheap, some are expensive, some a slow, some are fast, some are easy to maintain and have easy access to repairs, some are hard to repair and maintain, some are old and trusted, some are new and path breaking… there are 1000s of car models, that hardly anyone buys, and yet there are some 10-15 models that sell the most…

Essentially, the world is evolving, so is technology, needs change, time change, world progresses and gets more complex.

Anonymous 0 Comments

Because they all suck, in different ways, so you choose one that is relatively less sucky for what you want to do.