I found it's not the `if` that you want to avoid. It's that `if` needs to be deferred so that they resolve itself in the future, not in the moment they are defined.
IMHO, `if` can't be avoided, no matter how you do it. It's the nature of a condition. `switch` is just a decoy. `states` is a generalizaton, but won't be abe to cover all edge cases.