Replacing Optionals with Enums to Manage State
Using enumeration or enums to manage state is a useful option to make code less fragile and more robust by replacing state scenarios that shouldn’t be possible with solutions that make them impossible. Hold up – how do you end up in a state that shouldn’t be possible? The Problem with Optionals Using optionals […]