Hiker scared in the forest

Swift Enums — A story about choices

Keith Elliott (keithelliott.co)
11 min readApr 18, 2024

--

Introduction

Swift enums are powerful. I'll explain a few basic usages and then step things up with less apparent uses that will change how you write your code, providing more type safety and simplifying code that would otherwise create a spaghetti-noodle mess.

What if you had to create code to evaluate two conditions and react accordingly with expressions ("then…

--

--

Keith Elliott (keithelliott.co)

Tech vet, 20+ yrs from dev to CTO, startup enthusiast, husband, father of 5 + foster child. Eager to empower startups and motivate devs, thriving amid chaos.