From verbose to concise
From Class to Enum: Creating a Haptic Feedback Generator in Swift 5
From heavy to lightweight
Published in
6 min readJul 4, 2021
Say you’re making a singleton or static class to represent data and/or logic that will never change. In many cases, you can convert this logic to an enum and save yourself a bunch of hassle. An enum has much of the functionality of a class, but…