Solly
Lesson

Vocabulary: Singleton

Vocabulary after construction: Singleton

The previous exercise began with Expected Behavior and design pressure, not with this name.

The structure that emerged is traditionally called Singleton.

What the reasoning established

  • Stable role: Configuration loading is one capability.
  • Change pressure: Configuration content varies; identity within one root does not.
  • Ownership/lifetime when relevant: The composition root is the explicit singleton scope.
  • Structural consequence: The loader closure owns the one cached immutable object for its scope.
  • Runtime topology: First load reads and freezes; later loads reuse.

Nearby distinction

explicit shared lifetime: the important question is whether one identity is genuinely required in a defined scope, not how to hide a global instance.

Simplify

Ask whether any abstraction can be removed while preserving the original acceptance behavior and design-stress property. If yes, prefer the simpler design.

Use the pattern name to communicate a structure you can already justify. Do not use the name as a recipe that replaces requirements analysis.

Sign in with an enabled provider to save your lesson progress.
Sign in to track progress

Loading sign-in options…