Hi Miguel!

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.

Written by

Tech writer with 621K+ views. Sharing my opinion and what I learn. Danish C# backend engineer in FinTech. Ex Big4 senior tech consultant.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store