Programming Languages Quiz
Which language can you recognise from a short code snippet? From Python and Rust to Lisp and Haskell — 12 languages compared.
Recognise the Code
- Which language uses "def", indentation and f-strings?
- Python
- Created by Guido van Rossum in 1991. The name comes from Monty Python — not the snake.
- Which language uses "const", arrow functions and console.log?
- JavaScript
- Created in 10 days by Brendan Eich (Netscape, 1995). The name "Java" was marketing — the languages are unrelated.
- Which language uses "#include", "int main" and printf?
- C
- Developed by Dennis Ritchie at Bell Labs from 1972. The foundation of nearly every modern OS.
- Which language uses "std::cout", "<<" and templates like vector<int>?
- C++
- Bjarne Stroustrup started in 1979 as "C with Classes". Renamed to C++ in 1985 — a nod to C's increment operator.
- Which language requires "public class" and "public static void main"?
- Java
- James Gosling, Sun Microsystems, 1995. The name comes from Java coffee — Indonesia being the island of coffee origin.
- Which language uses "fn", "let mut" and ownership with &references?
- Rust
- Graydon Hoare at Mozilla, first stable release 2015. Delivers "memory safety without a garbage collector" — now in the Linux kernel and Firefox.
- Which Google language uses "func" and "fmt.Println"?
- Go (Golang)
- Google from 2007, public in 2009. Robert Griesemer, Rob Pike, Ken Thompson — three legendary engineers. Famous for fast compile times.
- Which language uses "puts", "do...end" and "3.times {…}"?
- Ruby
- Yukihiro "Matz" Matsumoto, Japan, 1995. Made famous by the "Ruby on Rails" web framework (2004).
- Which language opens with "<?php" and uses "$variable"?
- PHP
- Rasmus Lerdorf, 1994. Originally "Personal Home Page" — now "PHP: Hypertext Preprocessor". Still powers ~75% of all websites (incl. Wikipedia, WordPress).
- Which language uses SELECT, FROM, WHERE and GROUP BY?
- SQL
- "Structured Query Language", developed at IBM in the 1970s. Standard ISO/IEC 9075. Every relational database understands it.
- Which language uses "::" for types and pattern matching like "factorial 0 = 1"?
- Haskell
- Purely functional, lazy evaluation, statically typed. Named after logician Haskell Curry (1900–1982).
- Which language wraps everything in parentheses like "(defun …)"?
- Lisp
- John McCarthy at MIT, 1958 — second-oldest high-level language still in use (after Fortran). "LISP" = "LISt Processor". Detractors: "Lots of Irritating Single Parentheses".
Trivia & Knowledge
- Which language was designed in just 10 days during a vacation?
- JavaScript
- Brendan Eich at Netscape, May 1995. First called "Mocha", then "LiveScript", then "JavaScript" — pure marketing piggyback on Sun's Java.
- Which oldest high-level language is still actively used today — mostly in science?
- Fortran (1957)
- IBM team under John Backus. Still dominant in numerical physics, weather forecasting, climate models. Current standard: Fortran 2023.
- Which language was originally "C with Classes" — before being renamed?
- C++ (1985)
- Bjarne Stroustrup wanted to combine C's performance with Simula's classes. "++" is C's increment operator: "C plus one".
- Who is the "mother of COBOL" — and coined the term "computer bug"?
- Grace Hopper
- Hopper found a literal moth in a Mark II relay in 1947 — hence the bug. She was a US Navy Rear Admiral and key to COBOL's creation.
- Which language did Anders Hejlsberg create — after Turbo Pascal and Delphi?
- C# (Microsoft, 2000)
- Actually BOTH: Hejlsberg led Turbo Pascal (1983), Delphi (1995), C# (2000), and since 2012 TypeScript. An incredible language-design career.
- Which "esoteric" language has just 8 commands: > < + - . , [ ]?
- Brainfuck (1993)
- Urban Müller wanted the smallest possible compiler — it fits in 240 bytes. Turing-complete but practically useless. Exists purely for fun.