Programming Languages: how languages differ and which to choose
Programming Languages is an interactive programming languages course about how languages differ and why. In 28 short sections it covers machine code and assembly, compiled and interpreted languages, static and dynamic typing, object-oriented and functional programming, memory management with the stack and the heap, and how to choose the right language for a job.
It is not a course in one language. It is the map that makes every language easier to learn, because once you know what "compiled", "statically typed" or "garbage collected" means, you know a lot about a language before writing a line of it.
What the course covers
| Sections | Topic | What you do |
|---|---|---|
| 1 to 4 | What a language is, its history, machine code and assembly | Match code snippets to machine code, assembly or high-level languages |
| 5 to 8 | Compiled and interpreted languages | Follow both pipelines, then order the steps of compiling and running |
| 9 to 12 | Static and dynamic typing | Step through when each kind reports a type error, then sort languages into groups |
| 13 to 15 | Comparing languages, and Hello World in four of them | Identify the language from a snippet |
| 16 to 19 | Object-oriented and functional programming | Match each concept to its paradigm |
| 20 to 22 | Memory management, the stack and the heap | Complete a feature table for several languages |
| 23 to 25 | Popularity and choosing a language | Pick the right tool for real projects |
| 26 to 28 | The future of languages, and a review | Name the language from its description |
How code becomes something a CPU can run
A CPU only understands machine code, binary instructions specific to its design. Assembly gives those instructions short names, and high-level languages let you write in something closer to English. A compiler translates a whole program before it runs, as with C, C++, Go and Rust, which gives fast programs and catches many errors early. An interpreter runs code as it goes, as with Python, so you can test changes instantly. Some, such as Java, do a bit of both.
Types, paradigms and memory
Static typing checks types before the program runs; dynamic typing checks them as it runs. Object-oriented programming bundles data with the functions that act on it, using classes and objects; functional programming builds programs from pure functions that never change data in place. And every language has to manage memory: by hand in C, with a garbage collector in Java, Python and JavaScript, or with Rust's ownership rules.
Try a question from the course
Even "Hello, World!" shows a lot about a language. Python needs one line and no semicolon. JavaScript uses console.log and a semicolon. Java wraps everything in a class with a main method.
Python: print("Hello, World!")
JavaScript: console.log("Hello, World!");
Java: System.out.println("Hello, World!");Now identify the language of a new snippet, then press Mark to check your answer in the course.
Identify the language from each code snippet.
Press Mark to have your answer marked in the Programming Languages course.
Who this course is for
- Beginners deciding which language to learn first, who want to know what the choice really involves.
- GCSE and A-level computing students revising high-level and low-level languages, compilers and interpreters, and programming paradigms.
- Self-taught programmers who know one language and want to understand the ideas that connect it to others.
What you need to know first
Nothing formal. It helps to have written a few lines of code in any language, and the HTML, CSS & JavaScript course gives you that. Several later courses, including Search Algorithms, Raspberry Pi's and Micro Controllers, list this course as the one to take first.
How long it takes
There are 28 sections and most take a few minutes. Learners without a plan can open two sections of a course a day, in order, so the whole course takes 14 days. A plan removes the daily limit and lets you go straight to any topic, such as the stack and the heap. For more on two of the topics, see our guides to data types and functions and scope.
Common questions
Is this programming languages course free?
Which programming language should I learn first?
What is the difference between a compiled and an interpreted language?
What is the difference between static and dynamic typing?
What is the difference between high-level and low-level languages?
Does this course teach me to code?
Revision cards
Say the answer first, then flip the card to check it.
Where to go next
- Solve it
Code Editor
Write and run code right in your browser
Open the tool - Learn it
Programming Languages
Compiled vs interpreted, paradigms and the evolution of how we talk to machines
Start the course - Test it
GCSE Computer Science
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper