86
Avoiding if-else Hell: The Functional Style
(lackofimagination.org)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
Also take a look at the Specification Pattern for something similar.
That’s something I would only use if the logic becomes very complex, but it can help break things down nicely in those cases.