4 ms·
Using Enums makes you build a Finite State Machine and therefore all effects/state transitions explicit and concentrated at one place. This enables you to see w
by scns 5y ago
Using Enums makes you build a Finite State Machine and therefore all effects/state transitions explicit and concentrated at one place. This enables you to see what this particular piece of code is able to do. Methods could obscure what might happen. Using inline closures would make it hard if not impossible to get an overview what might happen.