Tech●●●●●Difficulty 1 of 5

What is a programming language, and why are there so many?

Thousands of programming languages exist, because every one of them is a different bargain between speed, safety and ease.

▶ Start the story

A programming language is an engineered language for writing computer programs in a form people can read. A can only follow very simple instructions, so a language is a bridge: you write something a human can follow, and software translates it into what the machine can run. There are so many languages because there is no single best bridge. Every design trades one good thing for another, and different jobs want different trades.

The first programmable computers appeared in the 1940s, and they were programmed in , the simple instructions a can run directly. That code was very hard to debug, and it would not run on a different kind of computer. came next to make programs easier for humans to follow, though they did not fix the problem of moving a program between machines. Then came , which hide the hardware's details so that arithmetic can be written in symbols and translated into machine code. Fortran, invented in 1957, is often considered the first compiled high-level language, and it is still in use today.

Two ways to give a computer instructions

Machine language

  • Simple instructions the runs directly
  • Very hard to debug
  • Won't run on a different kind of computer

High-level language

  • Hides the hardware's details
  • Arithmetic written in symbols, translated to machine code
  • Easier for people to understand

In the 1950s, people dreamed of one universal language for every machine and every use. By the early 1960s that idea was rejected, because code was written for such different purposes. Thousands of languages have been created since, and a single software project commonly uses five or more. COBOL is still strong in corporate data centers, Fortran in science and engineering, Ada in aerospace, and C in .

Trade-offs are the reason. Features that make a program more reliable typically cost speed. C gives power and efficiency, but at the price of making correct code harder to write. And a computer is unforgiving: a person can be ambiguous and still be understood, but a computer does exactly what it is told and cannot guess what you meant.

Quiz me

0/3

  1. 1.Why did high-level languages make programming easier than machine language?
  2. 2.What ended the 1950s hope of a single universal programming language?
  3. 3.What is the cost that comes with C's power and efficiency?

Recap

There are so many programming languages because each one is a different trade-off, and different jobs need different trades.

💡 A trick to remember it · Languages are like vehicles: a bicycle, a bus and a rocket all move you, but you pick one for the trip.

Surprising fact · The 1950s dream of one universal programming language was rejected by the early 1960s.

Sources (1)

No source, no claim. Every fact in this lesson (16 claims) cites at least one of these.

  1. [1]Programming language · Wikipedia
More lessons in 💻 Tech (3) See all tech lessons →

One more light on your map.

Get one lesson like this every day, about the things you love. Free, in two or five minutes.

Get the share card for this lesson ↗