r/programminghorror • u/MurkyWar2756 echo "Sub Mod" && :(){ :|:& };: • 16d ago
Java Too much nesting
72
Upvotes
16
7
u/Carmelo_908 15d ago
At least this is easily fixable by extracting function and inverting ifs with a early return
5
5
3
u/DontRelyOnNooneElse 16d ago
Eh. I've seen a lot worse. It's not great but I wouldn't call it a horror. 10 nested ifs is at least somewhat grokable. Try 50. That's where true abomination lies
48
u/orkeilius 16d ago
At least is easely solvable with early return