Code Smell 110 - Switches With Defaults
TL;DR: Don't add a default clause to your cases. Change it for an exception. Be Explicit.
Problems
Coupling
Fail Fast principle violation
Open-closed principle violation
Solutions
Replace if and cases with polymorphism
Change the Default code...
maximilianocontieri.com2 min read