Stupid Enum Tricks
summary
Shows how to use enums in Swift and enum classes in Kotlin to make code safer and less stringly typed, with concrete patterns and tools. Covers exhaustive enums (traffic‑light example), raw‑representable enums for Codable/CodingKeys, computed properties for UI titles/assets and UI tests, Kotlin sealed class for download state with progress, and metaprogramming via SwiftGen/Sourcery (Stencil templates) to generate enums from files. Examples run and are practical; watch if you want copyable patterns.
AI-written summary · about
chapters (13)
- 0:00Start
- 0:27Preface
- 1:29What Is an Enum
- 5:57Enum Class
- 12:35Swift's Codable Functionality
- 13:14Case Iterable
- 14:27Add Computer Properties
- 16:54Asset Catalogs
- 19:44Swift Gen
- 20:20Stencil
- 20:39Combining Protocols and Interfaces
- 23:25Associated Objects
- 29:56Beginners Mistakes








