Course Overview

What this Programming Paradigms course covers, how to use it, prerequisites.

Course purpose

A programming paradigm is a broad way of organizing computation and expressing solutions. Paradigms influence how programs represent state, describe control flow, compose behavior, model data, manage effects, and reason about correctness.

This course progresses from basic computational models to imperative, procedural, object-oriented, functional, declarative, logic, concurrent, reactive, event-driven, dataflow, and domain-specific approaches. It also explores type systems, language implementation, paradigm comparison, hybrid programming, software architecture, and advanced topics.

A paradigm is not a programming language. A language can support several paradigms. For example, Python supports procedural, object-oriented, and functional techniques; JavaScript supports imperative, object-oriented, functional, asynchronous, and event-driven styles; Rust combines imperative programming with algebraic data types, traits, ownership, and functional patterns.

Learning outcomes

After completing the course, learners should be able to:

Explain what a programming paradigm is and why paradigms matter.

Distinguish syntax, semantics, evaluation strategy, and computational models.

Write and compare imperative, procedural, object-oriented, functional, declarative, logic, and concurrent programs.

Understand state, mutation, scope, recursion, higher-order functions, closures, types, and effects.

Recognize event-driven, reactive, dataflow, pipeline, actor, and message-passing designs.

Select a paradigm or combination of paradigms for a given problem.

Compare readability, testability, performance, concurrency, maintainability, and safety trade-offs.

Understand how type systems, interpreters, compilers, and runtime systems affect programming style.

Refactor code between paradigms without changing observable behavior.

Design a small application using multiple paradigms deliberately.

Safe learning practice

Examples are educational. Run code in a local development environment, and adapt syntax to the language version and libraries you use. Some snippets are pseudocode when a concept is language-independent; those snippets are labeled accordingly.

How the Examples Were Checked

Every snippet that shows or implies an output was run while this course was built, and the output printed under it is exactly what that run produced: Python with CPython 3.13.1, JavaScript and TypeScript with Node.js 24.18 (TypeScript type claims checked with tsc --strict), SQL with SQLite through Python's sqlite3 module (on small sample tables described next to each output), and shell pipelines with Bash on Ubuntu 22.04 (WSL2). Three corrections came out of those runs: Node prints arrays as [ 2, 4, 6, 8 ]; the TypeScript type-error example now uses let (with const, the compiler reports an assignment-to-constant error rather than a type error); and Lab 1 prints 71.66666666666667.

Prolog, Haskell and Rust snippets are marked not run — no toolchain for them was available. Pseudocode and fragments are labelled as such in the text. Interactive simulators are labelled as simulations.

Course Roadmap

1. Foundations of programming paradigms Computation, paradigms, syntax, semantics 2. Imperative programming

Statements, state, assignment, control flow 3. Procedural and structured programming

Procedures, decomposition, scope, modularity 4. Object-oriented programming

Objects, classes, encapsulation, inheritance, polymorphism 5. Functional programming

Pure functions, immutability, higher-order functions 6. Declarative programming

What vs. how, queries, constraints, configuration 7. Logic and rule-based programming Facts, rules, unification, backtracking 8. Type systems and programming styles

Static/dynamic, nominal/structural, algebraic types 9. Generic, parametric, and metaprogramming Generics, traits, macros, reflection

10. Event-driven and callback programming Events, handlers, event loops 11. Concurrent and parallel programming

Threads, processes, synchronization, data races 12. Actor model and message passing Actors, mailboxes, supervision 13. Reactive and dataflow programming Streams, propagation, backpressure

14. Asynchronous and continuation-based programming Futures, promises, async/await, continuations

15. Pipeline, stream, and composition paradigms Pipes, stages, transformations

16. Domain-specific and data-oriented programming DSLs, ECS, columnar data, vectorization

17. Constraint, rule, and probabilistic paradigms Constraints, optimization, probabilistic models

18. Language semantics and evaluation models Operational, denotational, lazy/eager evaluation

19. Paradigms, architecture, and design trade-offs DDD, functional core, imperative shell, hexagonal design

20. Hybrid programming and paradigm selection Interoperability, refactoring, decision framework

21. Labs, capstone, review, and assessment Hands-on comparisons and final project