3 ms·
It's way too strong to say special cases are a code smell. A code smell is something that means most likely something is off. Special cases are just one way o
by dkarl 8y ago
It's way too strong to say special cases are a code smell. A code smell is something that means most likely something is off. Special cases are just one way of achieving a result and often the most readable and maintainable one. The alternatives can be just as "smelly" in their own right.
I'd say this is a special case (ha!) of the principle that each person and organization has their own personal tendencies. If you say "X is a code smell" and the internet disagrees, it probably means you or your organization have a tendency to choose X when it's not the right solution.