|
|
|
|
|
by cehrlich
1537 days ago
|
|
I like the 'guard clauses that return 0 etc at the top, "real" return at the bottom' style in general, but I find it important to be careful that it doesn't degenerate into 'returns in the top, middle, and bottom', which isn't any better than the thing we were trying to avoid in the first place. Similar thing with avoiding nesting and else clauses - generally a good idea, but occasionally they're the right choice, so better not to be dogmatic about it. |
|