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.26K 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

Let’s say you want to make a program that adds 2+3

without programming languages, from the machine’s perspective you’d need to do something like this:

Copy from from a specific memory address to the add buffer
Copy from another specific memory address to the add buffer.
Add both numbers in the add buffer
Read the result andCopy that result to some memory address

All of these commands are two character longs, because computers work in binary form, and we “translate” it into decimal or hexadecimal. So the real instructions without programming languages, in the language of the machine, might be something like this. (Yes I know my specific codes are all wrong, just demonstrating the principle. I haven’t coded in 20 years)

01 $FFFF
02 $FFFE
08
03 $FFFF

Now obviously, no programmer is going to waste his time keeping track of pure numbers for millions of lines of codes just to do a simple thing. So you have a programming language where you can write using actual commands, and it will “translate” into machine language.

some modern things can only be done using programming languages, or at least in a sane fashion. Programming languages and their compilers can handle assigning memory addresses for you so that you don’t have conflicts, either inside your own program, or with others. Now that our computers have several tiny processors, each of them being fed data through multiple “pipes”, programming languages can order things so they reach your processors in parallel at exactly the right time so nothing has to wait for previous instructions to complete.

Edit: There used to be far more people who programmed in machine language, or binary. Back when machines had very little memory or storage, and very little processing power. A basic PC cost 4-5 grand in today’s money, and its power was very limited. So, it was more efficient to pay programmers more working hours to make programs far more efficient. Nowadays even portable computers are exceedingly powerful, and they have tons of RAM/storage, so it’s more efficent/profitable to minimize time coding/programming even if programs aren’t as efficient as they could be.

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