| ▲ | mahboi an hour ago | |
Guard clauses are things that return early for trivial or problematic cases. Like https://en.wikipedia.org/wiki/Guard_(computer_science)#Flatt... They're one of those good practices that look like bad practice to everyone who just got a CS degree. Seems ex-students are unsettled by asymmetry or want to minimize the number of return statements. | ||
| ▲ | ramesh31 an hour ago | parent [-] | |
Particularly for high performance code when branch prediction is taken to account | ||