This article, is one of many that try to elminate if-else conditions without good reason. The examples provided are more the result of bad interface design and using the wrong abstractions than anything else.

Solutions liek the one presented make the code (as a whole, not the individual functions) unreadable for anyone but the original programmer.

As for that 'very particular case' you mention: in some 30 years in the software industry, I've rarely seen anyone make such a drastic move. In most cases, rewriting the software is easier and cheaper - such migrations are a programmer's dream that never comes true.

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