logoalt Hacker News

SoftTalkertoday at 3:35 PM0 repliesview on HN

Deeply nested if/else blocks are logically the same if you split them up into classes or functions that perform the same logic. They are harder to understand, harder to re-use, harder to work with in an editor... but should not be harder to test (you need to test all the possible use cases either way).