What makes different programming languages “better” than others? Or more powerful? Why have different languages developed over time? Are they all based on the same thing?

1.19K views

What makes different programming languages “better” than others? Or more powerful? Why have different languages developed over time? Are they all based on the same thing?

In: 187

78 Answers

Anonymous 0 Comments

They are literally languages.

Same way that we have different human languages, dialects, even ways of speaking for different purposes (formal, informal, technical, simple, etc.), we have different programming languages.

We have languages for children (e.g. LOGO, BASIC).

We have languages more suitable for specific areas of mathematics (FORTRAN, Prolog, Haskell, R)

We have languages that are very efficient to convey the most technical information exactly (e.g. C) but which are difficult to understand.

We have languages that are easy to understand and learn but take longer or do to say things in them.

We have languages for every kind of niche, purpose, design, intention, etc.

You wouldn’t use the same language in a court of law or when explaining to your kids, you wouldn’t use the same language when talking to your petrol-head friends or rocket-scientists compared to when you’re explaining the exact same concepts to your grandma. It’s easy to learn a Latin language, but comparatively very tricky to learn Chinese. It’s more difficult to learn a second language that’s different from the one you already know, but easy to learn a similar language. And so on.

It’s the same with programming languages – and they are called languages for a reason. You have to learn to think and talk in them, to explain the same concept but using a different grammar, and often to translate between them and also translate back to your native language (e.g. English).

You’re trying to explain to a foreigner (the computer) how to do the thing you want it to do (execute your instructions) and you need to do it in a language which you both understand well enough for you to explain and for the computer to understand. And such languages will have trade-offs in terms of how quick it is to program (explain what you want it to do) as well as how fast the computer can actually execute the task you want it to (how fast it can “understand” what you want it to do), plus how fluent you are in the language you choose to use.

Additionally, ALL computer languages are further translated AGAIN to actual machine code. By the compiler/interpreter. So you’re actually talking through many translations, which can slow things down, complicate matters or in some circumstances mean that its easier for you to “learn to speak” machine code than it is to try to explain what you want the computer to do in an intermediary language that will slow everything down.

Hell, even the “language” of CPUs is different to the language of GPUs, and even between different CPUs!

It’s generally believed that learning a programming language is as difficult, and affects many of the same areas of the brain, as learning a new foreign spoken/written language. They are all just about trying to establish effective communication in a stranger’s language.

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