Skip to content

Commit a87a44b

Browse files
committed
added a missing summary section to each chapter
Signed-off-by: Konstantin Läufer <laufer@cs.luc.edu>
1 parent c84e467 commit a87a44b

6 files changed

Lines changed: 80 additions & 4 deletions

File tree

source/20-imperative.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,3 +934,19 @@ The following example goes through several evolutions of a simple example to ill
934934
935935
Upon reflection, this journey also leads us away from simple, straight-line imperative or scripting code toward a more complex design involving higher-order parametrization and custom abstractions, which are hallmarks of object-oriented and functional programming.
936936
The endpoint of this journey thereby marks our transition to the object-oriented paradigm.
937+
938+
939+
Summary and further reading
940+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
941+
942+
The imperative paradigm is the foundational model of computation, directly reflecting the von Neumann machine architecture. Its core ideas — named mutable state, sequencing, branching, iteration, and procedural abstraction — appear in virtually every programming language and provide the baseline against which other paradigms are defined.
943+
944+
Working with built-in types and the Scala REPL or scripting tools offers a low-friction entry point into practical programming. As applications grow, concerns such as testability, constant-space complexity, and the separation of logic from I/O motivate the richer abstractions explored in the object-oriented (:doc:`/30-objectoriented`) and functional (:doc:`/40-functional`) chapters. The journey from a straight-line script to a testable, memory-efficient application already hints at these richer paradigms.
945+
946+
Further reading:
947+
948+
- Robert W. Sebesta, *Concepts of Programming Languages* (12th ed., Pearson) — broad survey of imperative, procedural, and other language paradigms.
949+
- Donald E. Knuth, *The Art of Computer Programming* (Vols. 1–4, Addison-Wesley) — deep treatment of algorithms and data structures from an imperative perspective.
950+
- `Scala 3 official documentation <https://docs.scala-lang.org/scala3/book/>`_ — authoritative reference for the Scala language used throughout this chapter.
951+
- `ScalaTest documentation <https://www.scalatest.org/>`_ — reference for the testing framework used in the examples.
952+
- Gamma et al., *Design Patterns: Elements of Reusable Object-Oriented Software* (Addison-Wesley, 1994) — the canonical catalog of patterns that arise as simple scripts evolve into larger designs.

source/30-objectoriented.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,3 +447,19 @@ The concrete ``fold.Main`` object is the only place where the two sides are conn
447447
This arrangement means we can swap in a different implementation—or a test double—without changing ``common.Main`` at all.
448448

449449

450+
Summary and further reading
451+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
452+
453+
The object-oriented paradigm extends the imperative model by organizing code around objects — bundles of state and behavior — that communicate through method invocation (message passing). Encapsulation, inheritance, and polymorphism enable the definition of reusable domain models and frameworks, and are the building blocks of many widely used languages and ecosystems.
454+
455+
Scala's combination of classes, traits, case classes, and higher-order capabilities makes it well suited for idiomatic OO design, including clean separation of interface from implementation, dependency injection via the Thin Cake pattern, and progressive refinement of abstractions. Design principles such as SOLID — and in particular the Dependency Inversion Principle — guide the construction of maintainable, modular systems. The endpoint of this chapter, reached by applying these principles, prepares the ground for the functional paradigm (:doc:`/40-functional`), where abstraction is taken further through higher-order functions and algebraic data types.
456+
457+
Further reading:
458+
459+
- Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, *Design Patterns: Elements of Reusable Object-Oriented Software* (Addison-Wesley, 1994) — the canonical catalog of OO design patterns.
460+
- Robert C. Martin, *Clean Architecture* (Prentice Hall, 2017) — design principles, including SOLID, applied to system-level structure.
461+
- Martin Odersky, Lex Spoon, and Bill Venners, *Programming in Scala* (5th ed., Artima) — authoritative Scala reference covering classes, traits, and the object model.
462+
- `Scala 3 official documentation <https://docs.scala-lang.org/scala3/book/>`_ — language reference for features used in this chapter.
463+
- Wikipedia, `SOLID <https://en.wikipedia.org/wiki/SOLID>`_ and `Dependency injection <https://en.wikipedia.org/wiki/Dependency_injection>`_ — accessible overviews of key OO design principles.
464+
465+

source/40-functional.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,8 +1191,14 @@ Observations
11911191
- The `Cats documentation <https://typelevel.org/cats/>`_ is the primary reference for these abstractions.
11921192

11931193

1194-
References
1195-
~~~~~~~~~~
1194+
Summary and further reading
1195+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
1196+
1197+
The functional paradigm treats computation as the evaluation of mathematical functions, emphasizing immutability, first-class and higher-order functions, recursion, and algebraic data types. These properties enable equational reasoning, compositional design, and strong static guarantees via the type system. Compared with the imperative paradigm (:doc:`/20-imperative`), functional code avoids mutable state and side effects; compared with the object-oriented paradigm (:doc:`/30-objectoriented`), it shifts the emphasis from class hierarchies to function composition and algebraic structure.
1198+
1199+
Scala supports the full spectrum from basic functional idioms — pattern matching, case classes, immutable collections, and for-comprehensions — to category-theoretic abstractions such as functors, monads, and recursion schemes, especially when combined with the Cats and Droste libraries. These abstractions appear throughout the representation and interpretation (:doc:`/50-representationinterpretation`) and concurrency (:doc:`/60-concurrency`) chapters as well.
1200+
1201+
Further reading:
11961202

11971203
- Jeremy Gibbons, *Origami Programming* (2003): `PDF <http://www.cs.ox.ac.uk/publications/publication2335-abstract.html>`_ — introduces folds and unfolds as general-purpose programming patterns.
11981204
- Luca Cardelli and Peter Wegner, *On Understanding Types, Data Abstraction, and Polymorphism* (1985): `PDF <http://lucacardelli.name/papers/onunderstanding.a4.pdf>`_ — foundational paper on parametric and subtype polymorphism.

source/50-representationinterpretation.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,3 +445,19 @@ Additional information is available here:
445445
- https://martinfowler.com/books/dsl.html
446446
- https://en.wikipedia.org/wiki/Domain-specific_language
447447
- `SE Radio episode 182 <http://feedproxy.google.com/~r/se-radio/~3/2VCOnKZ97MU/>`_
448+
449+
450+
Summary and further reading
451+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
452+
453+
This chapter connects the study of programming paradigms to the mechanisms that make programs executable and meaningful. A language toolchain — lexer, parser, type checker, and interpreter or compiler — transforms source text into something a machine can evaluate. Formal semantics (operational, denotational, and axiomatic) provide rigorous frameworks for specifying and reasoning about program behavior, complementing the informal descriptions given in the paradigm chapters.
454+
455+
Type systems add static guarantees that eliminate entire classes of runtime errors and guide program construction. Domain-specific languages extend these ideas to specialized vocabularies, either embedded within a host language (internal DSLs built on the functional and object-oriented abstractions of earlier chapters) or implemented as standalone tools. Together, these techniques are the foundation of programming language design and implementation, and they recur throughout the study of every paradigm in this book.
456+
457+
Further reading:
458+
459+
- Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman, *Compilers: Principles, Techniques, and Tools* (2nd ed., Addison-Wesley, 2006) — the authoritative reference on lexing, parsing, semantic analysis, and code generation.
460+
- Benjamin C. Pierce, *Types and Programming Languages* (MIT Press, 2002) — comprehensive treatment of type theory and its applications.
461+
- Glynn Winskel, *The Formal Semantics of Programming Languages* (MIT Press, 1993) — rigorous introduction to denotational and operational semantics.
462+
- Terence Parr, *The Definitive ANTLR 4 Reference* (Pragmatic Bookshelf, 2013) — practical guide to parser generation with ANTLR.
463+
- Martin Fowler, *Domain-Specific Languages* (Addison-Wesley, 2010) — comprehensive guide to internal and external DSL design patterns.

source/60-concurrency.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,14 @@ Several specific concurrency mechanisms can come as language constructs, pattern
461461
- `software transactional memory <https://en.wikipedia.org/wiki/Software_transactional_memory>`_
462462

463463

464-
References: concurrent and asynchronous computing
465-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
464+
Summary and further reading
465+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
466+
467+
The concurrent programming paradigm addresses the coordination of multiple simultaneous activities. Key challenges — shared state, race conditions, deadlock, and the tension between safety and liveness — arise regardless of the specific mechanism used: threads and locks, futures and promises, actors, reactive streams, or software transactional memory. The distinction between concurrency (managing multiple interleaved activities) and parallelism (executing them simultaneously for performance) is an important organizing principle.
468+
469+
Modern Scala ecosystems have largely shifted toward purely functional, composable concurrency abstractions via `Cats Effect <https://typelevel.org/cats-effect/>`_ and `ZIO <https://zio.dev/>`_, which provide structured concurrency and resource safety by construction, and avoid the subtle bugs that accompany unstructured thread and lock programming. These abstractions build on the functional paradigm (:doc:`/40-functional`) and are well suited to the reactive and event-driven styles discussed in the other paradigms chapter (:doc:`/75-otherparadigms`).
470+
471+
Further reading:
466472

467473
- Läufer and Thiruvathukal, `CDER book chapter <https://arxiv.org/abs/1705.02899>`_
468474
- Goetz et al., `JCIP <http://jcip.net.s3-website-us-east-1.amazonaws.com>`_

source/75-otherparadigms.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,19 @@ Constraint programming extends logic programming by allowing variables to be con
201201
% X = 1, Y = 9 ; X = 2, Y = 8 ; ...
202202
203203
See also the discussion of Prolog and backtracking in :doc:`/70-logic`.
204+
205+
206+
Summary and further reading
207+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
208+
209+
Beyond the core paradigms covered in earlier chapters, declarative, reactive, aspect-oriented, dataflow, event-driven, and constraint programming offer specialized models well suited to particular problem domains. Declarative programming — exemplified by SQL, XSLT, and HTML — describes *what* is desired rather than *how* to achieve it, a theme shared with the functional (:doc:`/40-functional`) and logic (:doc:`/70-logic`) paradigms. Reactive programming brings composable stream operators to continuous event processing. Aspect-oriented programming addresses cross-cutting concerns — logging, security, transactions — that resist modular encapsulation in purely OO or functional designs. Dataflow and event-driven models reflect the structure of many real-world systems, from signal processing pipelines to graphical user interfaces and web servers. Constraint programming extends logic programming with domain-specific solvers for combinatorial search problems.
210+
211+
In practice, modern languages and frameworks borrow freely from multiple paradigms simultaneously. A Scala web service, for instance, may combine OO domain modelling, functional data transformation, reactive stream processing, and actor-based concurrency — making paradigm literacy essential for any serious practitioner.
212+
213+
Further reading:
214+
215+
- Martin Fowler, *Domain-Specific Languages* (Addison-Wesley, 2010) — comprehensive guide to internal and external DSL design and implementation.
216+
- Stephen Blackheath and Anthony Jones, *Functional Reactive Programming* (Manning, 2016) — approachable introduction to FRP concepts and their application.
217+
- `ReactiveX documentation <https://reactivex.io/>`_ — reference for the Rx family of reactive programming libraries (RxJava, RxScala, RxJS, and others).
218+
- `SWI-Prolog CLP(FD) documentation <https://www.swi-prolog.org/man/clpfd.html>`_ — constraint logic programming over finite domains.
219+
- `Cats Effect documentation <https://typelevel.org/cats-effect/>`_ and `ZIO documentation <https://zio.dev/>`_ — structured, functional concurrency and effectful reactive programming in Scala.

0 commit comments

Comments
 (0)