
Stop Using Else in Your Programs - odxs
https://medium.com/better-programming/why-you-need-to-stop-using-else-statements-5b1fd09dea9e
======
gregjor
The Specification Pattern could be considered a software anti-pattern.

[https://en.m.wikipedia.org/wiki/Specification_pattern#Critic...](https://en.m.wikipedia.org/wiki/Specification_pattern#Criticisms)

I think the author got it right with the simple and clear guard clauses, which
don’t require useless patterns and unnecessary OOP for its own sake.

------
geforce
The specification pattern can also be used to replace multiple IFs. If you
look at Wikipedia, they propose a quite full-fledged and complex specification
pattern, but it is possible to make a more lightweight one for your needs.

