Eli5: What is the difference between various programming languages? Dont they all do the same thing?

799 views

Eli5: What is the difference between various programming languages? Dont they all do the same thing?

In: 33

27 Answers

Anonymous 0 Comments

It serves the same purpose as specialized human languages, like math.

It lets you say this:

> What number will produce 5 when you multiply it by three?

Much more easily and clearly:

> 5 = 3X

Which matters a lot when the equation grows more complicated, or when the answer to an equation is another equation. At that point you may be comparing *a whole page* of text to a single line of math. It’s easier to read, easier to write, and easier to remember.

But note that anything you can describe in math can also be described in a normal spoken language. It’s not any more *capable*, it’s just *sometimes preferred*.

In the same way, some programming languages are *in practice* much easier to use to do specific things. They’re faster to write, or result in fewer mistakes, or execute faster, or something.

The uses of programming are *extremely* widely varied, so there are *a lot* of niches worth optimizing for, so we have a lot of languages. This will always be true, and it’s a good thing 🙂

Anonymous 0 Comments

Just like English is different from French. They both accomplish the same thing – convey ideas and concepts from one person to another. However there are some things that can be expressed more easily in one language than another. Sometimes there are things one language can express trivially which another just can’t. At least not without a lot of effort.

Anonymous 0 Comments

Programming languages are tools. Tools are purpose built to solve a problem. They’re great at solving that specific problem, and not much else.

Such is the nature of programming languages.

There’s no one language that does it all. Gotta pick the right tools for the job. Sometimes that’s Java, or C#, or Python, or C++, etc.

Of course if you abstract enough its possible that one language does “do it all,” but at a ridiculous cost I imagine.

Anonymous 0 Comments

The word “language” is actually a decent analogy for ELI5.

Spoken langauges all do the same thing, convey information. But they do it in different ways, with different levels of culture and function. Some are easier to write or read. Varying levels of difficulty to learn or history.

New spoken languages pop up like coding ones too. And they usually come with clear benefits but just try convincing a bunch of people that speak one language, to learn an entirely new one they aren’t comfortable with.

The one big note for coding languages is when it is appropriate to use each. Some are much better suited for specific tasks. Python for AI and big data. C for applications. Java for web based. They can all do it all (more or less). But you trend toward what they’re good at because “when in Rome”.

Anonymous 0 Comments

there is a lot of difference. first you have to compare between interpreter and compiler languages. think about it as you have got a helper from mars who only speaks martian. you have a list of things to do written in your language. now you can translate the list line by line and tell the martian every line. the advantage is that he can start at once, but it is slow. that is an interpreter language. if you use a compiler language, the whole text is translated in martian. so you helper can work much faster, because he does not have to wait for the translation, but he has to wait, until the whole text is translated.

the second thing to compare is the languages style. there are old languages that work like buying lists. if you write down milk, butter, if bread is on sale, bring 2 is a supermarket language, you can program your little brother with. another style is object oriented language. one day, some clever people thought, there has to be a programming language that works like the real word. so they invented object oriented programming. the thin with object oriented programming is that you create a thing and give it properties and procedures. lets look at you little brother. he is an object already, he has got a hight and a weight and a haircolor wich are his properties. now you can teach him how to buy milk, bread and butter, these are his procedures. and when you want him to buy milk you can call his milkbuyprocedure with brother.milk. this sounds more complicated, because we are more familiar with the buying list, but with object oriented programming, you can clone your brother, you can send one to buy milk, one to buy bread and one to buy butter.

Anonymous 0 Comments

They don’t all do the same thing. Some of them are custom-built for certain purposes (e.g. database management versus number-crunching).

Others are built especially to cater to certain environments, either a type of hardware or a particular software environment.

The difference between the remaining “general purpose” languages usually comes down to a difference of opinion about the best way to write programs. For example, some might favor an approach where you declare types beforehand in great detail; others might just let the compiler figure out the types at compile time.

Anonymous 0 Comments

Some of them are general languages that try to solve (almost) all programming problems, just with different approaches. But most programming languages are created to be particularly suitable for a specific type of problem.

Java, C# application dev on a proper operating system.

Python, quick scripting and tying lots of different existing software components together into larger system.

IEC 61131-3, real time logic on industrial controllers.

Cobol, business logic on prehistoric mainframes that works in ways nobody living remembers anymore.

Labview, for measurement, test and signal conditioning tasks where its beneficial to think of computation in similar ways to how analogue electronics works.

PHP webpage backends.

Matlab for numeric math intensive problems.

Mathematica for symbolic math problems.

Etc etc etc. Most languages are not meant for everything, they are meant for a particular type of problem that is poorly addressed in other languages.

Anonymous 0 Comments

What is the difference between various ~~programming~~ languages? Dont they all do the same thing?

Anonymous 0 Comments

My friend summed it up like this:

“If you’re writing in C++, you’ll spend 9 months writing the code and it will take 3 months to run. If you’re writing in Python, you’ll spend 3 months writing the code, but it will take 6 months to run.”

Different languages are better suited for different tasks. Some are very complex and detailed, but allow you to be very efficient. Others hide some details from you and instead save a lot of your time. And there are also some things that we just have to live with, like compatibility. If your company has been writing software in this one language for years, transitioning into something else is extremely costly, so you stick to that language even if there are better options out there.

Anonymous 0 Comments

What’s the difference between human languages aren’t they all pretty much the same thing?