Hi Stancho,

Thanks for reading my article. It’s much appreciated :)

if is completely fine. I think you’re missing the point. The point is to not use conditional branching to extend your application.

The code you pasted is handling dynamic type discovery.

Also, reflection is entirely suitable in this scenario.

--

--

Software Developer Manager | Big4 ex. FinTech | Writer with +1M views. Sharing my opinion & what I learn. YT channel youtube.com/c/NicklasMillard

Love podcasts or audiobooks? Learn on the go with our new app.

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
Nicklas Millard

Nicklas Millard

Software Developer Manager | Big4 ex. FinTech | Writer with +1M views. Sharing my opinion & what I learn. YT channel youtube.com/c/NicklasMillard