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

825 views

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

In: 33

27 Answers

Anonymous 0 Comments

The Wrench Analogy:

Think of programming languages like a collection of wrenches in a tool box. You have box wrenches, open wrenches, combination wrenches, adjustable wrenches, pipe wrenches, line wrenches, socket wrenches, ratcheting socket wrenches, and on and on.

All of them accomplish the same thing. They turn a bolt. A box wrench/open/combination is like assembly language. It’s the most basic way to interface with the bolt. It goes over the bolt and you have to manually turn it. When you’re done adjusting a bunch of bolts you have a bunch of wrenches to clean up.

Sockets wrenches are like C / C++. They are a little more user friendly. You can extend them, add an elbow to get around a corner. You have big handles, small handles, different size connectors to between the socket and handle depending on how big the job is, etc.. C++ might be closer to a ratcheting socket, in that it does a little bit more of the work for you. You still have to clean up, but you’ve lost half the sockets already and they’re tiny anyway.

Pipe wrenches, line wrenches, and any specialized wrench is akin to languages like FORTRAN where they have specific uses. Sure they can step outside of their use cases a little, but often it’s more work than just getting a proper wrench.

Adjustable wrenches are kind of like .Net or basic interpreted languages. It’s designed to fit a lot of bolts, but it slips sometimes and isn’t always going to be the best or fastest. Other interpreted languages might compare to the Gator Grip. It’ll work for small jobs, but the second you throw anything big at it, expect it to fall apart.

Next you have impact wrenches. These are like scripting languages, i.e. PHP, Javascript, bash, sh, etc.. It’s a powerful tool that does specific jobs very well but it’s not going fit into a tight spot and give you the finesse of an extended socket wrench.

Then you have Java – that’s just a hammer.

You are viewing 1 out of 27 answers, click here to view all answers.