I can understand the catchy title, but making a sweeping statement that “if-else” is bad by providing one (not very common) use case where that applies is also wrong.

I train developers daily and they often come with these ideas that using “if else” anywhere should be avoid because someone on the internet said so.

You argue that if else branching leads to complexity of code, then you provide an example of how to introduce multiple classes and argue that complexity is OK sometimes.

And lastly, I would just use a state machine library like Stateless to model my uses cases instead create custom POCOs.

Tech Nerd