Albion Bame
Aug 29, 2022

Just because we can do this, doesn't mean that we should. It works and all but it should be avoided.

This way we're not able to run any static code analysis tools, we have to add additional conditions to check if the method exists or not, the code loses readability, it's hard to test and the list goes on.

Personally I'd suggest to avoid this as much as possible.

Albion Bame
Albion Bame

Written by Albion Bame

Howdy, I’m Albion. I’m a Software Engineer living in Frankfurt am Main, Germany. I’m originally from Albania. I am a fan of DIY, cycling, camping and reading.

No responses yet