Uni-Sine
Computer ScienceCourses

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

SectionsTopicWhat you do
1 to 4What a language is, its history, machine code and assemblyMatch code snippets to machine code, assembly or high-level languages
5 to 8Compiled and interpreted languagesFollow both pipelines, then order the steps of compiling and running
9 to 12Static and dynamic typingStep through when each kind reports a type error, then sort languages into groups
13 to 15Comparing languages, and Hello World in four of themIdentify the language from a snippet
16 to 19Object-oriented and functional programmingMatch each concept to its paradigm
20 to 22Memory management, the stack and the heapComplete a feature table for several languages
23 to 25Popularity and choosing a languagePick the right tool for real projects
26 to 28The future of languages, and a reviewName 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.

Interactive calculatorCode EditorTry the JavaScript examples from the course in your browser, with a console for the output.

Common questions

Is this programming languages course free?
You can take every section without paying, two sections a day, in order. A plan removes the daily limit and opens any section straight away.
Which programming language should I learn first?
It depends on what you want to build. Python is a common first choice for its simple syntax, and JavaScript if you want to make websites. The course's "choosing the right language" sections walk through the trade-offs for different projects.
What is the difference between a compiled and an interpreted language?
A compiled language is translated into machine code before it runs, producing a fast standalone program. An interpreted language is translated and run as the program goes, so there is no build step but it usually runs slower.
What is the difference between static and dynamic typing?
In static typing each variable has a fixed type checked before the program runs, as in Java. In dynamic typing a variable can hold any type and errors appear only when that line runs, as in Python.
What is the difference between high-level and low-level languages?
Low-level languages, machine code and assembly, are close to how the CPU works. High-level languages such as Python and Java are closer to human language and must be translated before the CPU can run them.
Does this course teach me to code?
It teaches how languages work and differ, with short code examples, rather than building programs in one language. Pair it with practice in a language of your choice.

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
Read next
Computer Science · CoursesWeb hosting course: deploy a website from Git to HTTPSAn interactive web hosting course: DNS, static and dynamic hosting, Git deploys, CI/CD, secrets, Docker, HTTPS and monitoring, in 30 short sections.