hpique/SwiftSingleton resource
An exploration of the Singleton pattern in Swift observed · 2026-08-28
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4467
- days_rel: n/a
- days_push: 3588
- n_releases_24m: 0
Adoption not part of the score
1127 stars · 101 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
An educational repository exploring different implementations of the Singleton pattern in Swift, comparing class constant, nested struct, and dispatch_once approaches. It demonstrates lazy initialization and thread safety trade-offs across Swift versions.
Use cases
- how to implement a singleton in Swift
- thread-safe singleton Swift example
- lazy initialization singleton pattern Swift
- Swift 1.2 static let singleton
- dispatch_once singleton in Swift
- nested struct singleton workaround
When to choose
- learning how the Singleton pattern works in Swift
- comparing historical Swift singleton implementations
- teaching design patterns in Swift courses
When to avoid
- production code on modern Swift versions where static let is standard
- needing up-to-date Swift concurrency patterns like actors
- looking for a maintained library rather than a reference example
Facets
learning-resource · maturity abandoned
developer-tools developer-tools tutorials programming-languages swift singleton-pattern design-patterns educational thread-safety ios macos
1 source
- readme: https://github.com/hpique/SwiftSingleton · fetched 2026-08-28 · 4a8548a62e87
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| hpique/SwiftSingleton | main | 32 |
For agents
markdown · JSON · MCP: product_card(name="hpique/SwiftSingleton")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem