Why do you think that is a good idea?
I’d argue that the
when statement + sealed class is perfect here because:
- Faster to write and smaller change of forgetting to handle a case: Alt + Enter >> *Add remaining branches* in Intellij/ Android Studio generates all branches
- Easy to read and debug