Study Projects
Short examples show syntax; real codebases show how a paradigm shapes architecture, error handling, and module boundaries at scale. This page lists public open-source projects chosen because each one commits clearly to a specific paradigm. Pair this page with Demo Examples and References.
How to Read a Codebase for Its Paradigm
When inspecting a repository from a paradigm perspective, ignore build boilerplate at first and ask four targeted questions:
- Where does state live? Is it encapsulated inside objects, threaded through pure functions, held in actor mailboxes, or derived from event streams?
- How does control flow? Look for loops, recursion, pattern matching, message passing, or constraint search.
- How are errors represented? Compare exceptions, algebraic result types, and supervisor restarts.
- How are modules composed? Notice whether extension happens through class inheritance, type classes/traits, interfaces, or higher-order functions.
Functional and Pure Typed Codebases
Projects that organize large systems around immutable data, algebraic types, and explicit effect boundaries.
| Project | What to study | Prepare with |
|---|---|---|
| jgm/pandoc | Document converter in Haskell: a single central AST transformed by pure readers and writers. | Functional, Haskell |
| elm/compiler | Pure functional compiler architecture with structured error reporting and zero runtime exceptions. | Elm, Haskell |
Logic and Constraint Engines
Systems where computation is expressed as relations, rules, and search strategies rather than step-by-step procedures.
| Project | What to study | Prepare with |
|---|---|---|
| SWI-Prolog/swipl-devel | Standard library predicates in library/ showing Prolog lists, DCGs, and constraint libraries. | Logic Programming, Prolog |
| potassco/clingo | Answer Set Programming solver and its examples/ directory of declarative planning models. | Clingo |
Concurrent, Actor, and Reactive Systems
Codebases built around isolated processes, message queues, or composable asynchronous event streams.
| Project | What to study | Prepare with |
|---|---|---|
| erlang/otp | gen_server and supervisor behaviors: fault isolation and let-it-crash recovery. | Concurrent, Erlang |
| phoenixframework/phoenix | Elixir web framework combining functional plug pipelines with concurrent channels. | Elixir |
| ReactiveX/rxjs | Observable implementation and composable stream operators in TypeScript. | Reactive, RxJS |
| lit/lit | Lightweight Web Components library showing encapsulated custom elements and reactive properties. | Component-Oriented, Web Components |
Hybrid and Multi-Paradigm Systems
Production languages and tools that blend paradigms to balance performance, safety, and expressiveness.
| Project | What to study | Prepare with |
|---|---|---|
| rust-lang/rust | Standard library traits, iterators, and ownership rules combining systems control with functional ergonomics. | Hybrid Systems, Rust |
| JuliaLang/julia | Base array and math modules showing multiple dispatch across numeric and array-oriented code. | Array-Oriented, Julia |
Cross-Paradigm Reading Plan
Compare how different paradigms solve the same structural problem by reading one module from each pair:
| Problem | Compare | Question to answer |
|---|---|---|
| AST transformation | jgm/pandoc (Haskell) vs. an OOP visitor | How does adding a new node type vs. a new output format differ in effort? |
| Concurrency & failure | erlang/otp supervisors vs. Go channels | Which model handles unexpected worker crashes without leaking state? |
| UI state updates | elm/compiler / Elm Architecture vs. ReactiveX/rxjs | How do single-store state transitions compare with push-based event streams? |
Practice Lab
Apply the reading method above to consolidate the roadmap:
- Trace one AST pass. Open a small writer module in
jgm/pandocand list the data types it transforms without mutating state. - Compare two concurrency models. Contrast an Erlang
gen_servercallback module with a goroutine-and-channel worker from Go. - Rewrite a loop declaratively. Take one imperative filter-and-aggregate loop you wrote recently and express it in both functional (map/filter/reduce) and logic (Prolog rules) styles.