A cross-language orientation from Amit’s Library. Use the existing Atlas modules for full lessons and practice.
Programming concepts: paradigms and language design
Start with the questions that transfer
If you can trace a variable, a condition and a function call, you can start comparing languages. If those ideas are new, begin with Computer foundations and the Web or Python Foundations module, then return here.
Use this orientation to identify a programming style, predict what a small program means, explain a type or scope choice, and separate a successful run from evidence of correctness. It is a cross-language reading guide, not another language pack or a replacement for the existing lessons.
Compare approaches without ranking languages
A paradigm is an approach to structuring computation. The same application can combine approaches; a language name alone does not tell you which style a particular function uses. Procedural programming groups operations into procedures or functions and often uses imperative steps.
| Approach | Question to ask | Existing next lesson |
|---|---|---|
| Imperative / procedural | Which operations change state, and in which order? | Python functions and loops |
| Object-oriented | Which objects own state and offer operations through methods? | C++ objects and value types |
| Functional style | Which functions transform inputs into results, and which effects remain? | Python transformations |
| Declarative | What result or relationship is required, leaving execution choices to an engine? | SQL queries |
Event-driven code adds a question about when work begins: a callback may run after an event. Its body can still be procedural, functional-style or object-oriented. Study the existing Web module’s event examples after learning the basic control flow.
Source notes: Python Functional Programming HOWTO.
Five language-design questions
Compiled versus interpreted describes implementation strategies, not a ranking of paradigms. A runtime can combine translation, bytecode interpretation and compilation. A type checker, an execution engine and a deployment environment answer different questions.
| Concept | Useful distinction | Try next |
|---|---|---|
| Syntax and semantics | Syntax specifies permitted form; semantics gives that form meaning. Valid punctuation does not guarantee the intended calculation. | Web expressions |
| Types and checks | Static checks can reject some programs before execution; dynamic languages also have types and check operations while running. Coercion is a separate rule. TypeScript types do not automatically validate external JSON. | TypeScript types and narrowing |
| Scope and bindings | Ask which declaration a name refers to. A parameter can hide an outer name. Scope is not the same question as how long an object remains alive. | Python functions and modules |
| Control flow | Trace sequence, branches, loops, calls and returns. Recursion and event callbacks need explicit stopping or triggering conditions. | Algorithms |
| Errors and correctness | Separate parsing/static-check failures, runtime exceptions and wrong results that produce no exception. Define normal, boundary and invalid cases. | Python errors and tests |
Source notes: Python execution model; Python errors and exceptions; TypeScript handbook: the basics; Java Virtual Machine Specification (Java SE 25), §1.2; ECMAScript language specification: addition.
One small contract, different expressions
Use integer scores 4, −1 and 7. Ignore negative scores and add the rest: the expected total is 11. Keep the task and inputs fixed so a syntax comparison does not quietly change the problem.
One contract, two Python styles
Input is a small list of integers. Include zero and positive values; ignore negative values; an empty list totals zero. No general input validator or floating-point guarantee is implied.
scores = [4, -1, 7]
total = 0
for score in scores:
if score >= 0:
total += score
expression_total = sum(score for score in scores if score >= 0)
print(total, expression_total)
Expected output
11 11
The loop exposes changing local state. The expression describes a filtered stream and a reduction. Both use Python; a language can support several styles. The expression is functional-style composition, not evidence that Python is a purely functional language.
The same result as a declarative query
SQLite demonstration with authored integer rows. COALESCE makes the empty eligible set total zero; SQL NULL behavior and a real schema require their own checks.
WITH scores(value) AS (VALUES (4), (-1), (7))
SELECT COALESCE(SUM(value), 0) AS total
FROM scores
WHERE value >= 0;
Expected output
11
The query specifies eligible rows and an aggregate. The database engine chooses an execution strategy. Matching this result does not mean every SQL dialect, NULL policy or numeric type behaves identically.
Source notes: Python expressions; SQLite SELECT; SQLite aggregate functions.
Check the operator and the name binding
Read meaning and bindings, not just punctuation
JavaScript with ordinary primitive string/number values; this conversion example is not an arbitrary-input parser.
const score = "4";
console.log(score + 1, Number(score) + 1);
let total = 2;
function next(total) {
return total + 1;
}
console.log(next(10), total);
Expected output
41 5 11 2
The first addition concatenates text; the explicit conversion permits numeric addition. Inside next, the parameter total shadows the outer name. Returning 11 does not assign to the outer total, which stays 2. Scope concerns which binding a name denotes; it is different from an object’s lifetime.
Valid syntax can still raise an error
The handler catches this expected TypeError only. It does not turn unrelated failures into success.
try:
print("4" + 1)
except TypeError:
print("TypeError")
Expected output
TypeError
Python does not perform JavaScript’s string-plus-number conversion here. The source parses, but that operation raises TypeError when evaluated. A program can also run without an exception and still compute the wrong answer.
Source notes: ECMAScript language specification: addition; Python execution model; Python errors and exceptions.
History sidebar: name the milestone
A single date can mean design work, a first working implementation, public publication, a commercial release or a standard. This short selection names its milestone; it is not a complete family tree or a popularity ranking.
| Language | Milestone | What the date means | Primary source |
|---|---|---|---|
| Fortran | 1957 debut | IBM’s first Fortran implementation became available in 1957 after several years of development. That is an implementation milestone, not the start of all programming. | IBM history of Fortran |
| BASIC | 1964 first successful Dartmouth runs | The first successful programs ran on 1 May 1964. Later microcomputer BASIC versions belong to its subsequent adoption, not its origin. | BASIC begins at Dartmouth |
| Pascal | 1970 publication | Niklaus Wirth records publication in 1970. Later textbooks and commercial dialects do not move that starting date. | 50 years of Pascal — Niklaus Wirth, ETH Zurich |
| C | 1969–1973 development; 1972 central | Ritchie describes a development period, especially 1972. The 1978 K&R book is a later publication milestone. | The Development of the C Language — Dennis Ritchie |
| C++ | 1979 work; 1983 name; 1985 commercial release | C with Classes work, the C++ name and its first commercial implementation are separate events. | Bjarne Stroustrup: When was C++ invented? |
| Python | 1989 development; 1991 public posting | Guido van Rossum began during the 1989 Christmas holidays and posted publicly in February 1991. Later Python 3 releases are not the language’s origin. | Python General FAQ: why Python was created |
| Java | 1995 first release | Java was first released by Sun in 1995. The language, JVM specification and individual JDK releases have distinct histories. | Java: first release |
Java popularized portable bytecode through the JVM; it did not invent virtual-machine portability. Pascal’s 1973 p-code work predates Java, and the JVM specification itself acknowledges UCSD Pascal’s P-Code machine. Portability still depends on a compatible runtime, class-file version and the libraries or platform facilities a program uses.
Source notes: ETH research highlights: Pascal; Java Virtual Machine Specification (Java SE 25), §1.2.
Make one change and explain the result
Choose a full module for the next experiment. Record the language/runtime version, input, expected output and actual result. A passing small example is evidence for that case, not complete language coverage.
- Predict both Python totals before running them with an empty list, all-negative input, zero and repeated values. Explain why duplicates still contribute.
- Keep the Python input unchanged. Then compare the SQLite query with the same authored rows; account for the empty set explicitly.
- In the JavaScript example, compare the string "4" with the number 4. Explain which operation concatenates and which adds.
- Rename the function parameter and predict whether the result or outer total changes. Explain the binding, not only the output.
- Distinguish the expected Python TypeError from a syntax error and a deliberately wrong total. State what each check establishes.
Website orientation and offline edition
This orientation accompanies the website Atlas. The existing website collection has 25 modules; the pinned offline Atlas 0.11.0 download contains its earlier 19 packs. This page adds neither a tested language identity nor a new pack to those counts.
The website’s six later reference modules remain separate from the 0.11 download. Existing ZIP, PDF and source-JSON downloads are unchanged; this orientation is not included in that offline edition. Use the Atlas hub to choose an edition and read its recorded runtime and coverage limits.
Code here is reading material with expected output, not an execution console. The page does not run pasted programs or call an AI service. The validation note records which local examples were actually checked; it does not refresh older Atlas test dates.
Local example validation
Local checks on 6 November 2026 executed these four authored examples using CPython 3.9.6, Node v24.18.0 and Python’s embedded SQLite 3.54.0. Five manually specified cases—original input, empty input, all-negative input, zero and duplicates—also matched the expected totals in the Python loop, generator expression and actual in-memory SQLite query; the Python input stayed unchanged. These checks cover small authored cases, not arbitrary input, complete language conformance or cross-platform behavior.
Installed CPython 3.9.6 is unsupported upstream; this is a record of the test environment, not an installation recommendation. See Python version status. These checks do not refresh older Atlas test dates. Browser, hosted-page, cross-browser and screen-reader acceptance were not performed for this page.
Primary sources
References support the scoped concepts and selected milestones above. These are curated source links, not a complete history or a guarantee of future external availability.
- Python Functional Programming HOWTO
- Python execution model
- Python expressions
- Python errors and exceptions
- ECMAScript language specification: addition
- TypeScript handbook: the basics
- SQLite SELECT
- SQLite aggregate functions
- IBM history of Fortran
- BASIC begins at Dartmouth
- 50 years of Pascal — Niklaus Wirth, ETH Zurich
- The Development of the C Language — Dennis Ritchie
- Bjarne Stroustrup: When was C++ invented?
- Python General FAQ: why Python was created
- Java: first release
- Java Virtual Machine Specification (Java SE 25), §1.2
- ETH research highlights: Pascal
- Python Developer’s Guide: status of Python versions