Thanks for taking the time to read my article! Much appreciated :)
Sure, I can see your point regarding example 5. I do also state that you’d want to have the discovery process code somewhere else than inside the method itself.
It would be a terrible mistake to use if-else the context of example 5. The point is to be able to extend the application just by adding a new class. That’s not possible with you go down the if-else rabbit hole.