Re:Anti-If: The missing patterns (2016)
by jakewins on Wednesday June 27, 2018 @11:41AM
(#17409053)
Yes - the cache example is bad; my point is the general idea of avoiding branches that merge back into the main function.
In your example above, the branch does merge back, and clearly that's fine for a small function - and common pattern - like this. But the general idea would be to avoid it if possible, because that removes unnecessary complexity.
In your example above, the branch does merge back, and clearly that's fine for a small function - and common pattern - like this. But the general idea would be to avoid it if possible, because that removes unnecessary complexity.