8 ms·
Although I've been avoiding multiple exists, I don't think the the patten is that bad, just more of personal taste. However, I think it's import to let the rea
by frogcoder 7y ago
Although I've been avoiding multiple exists, I don't think the the patten is that bad, just more of personal taste. However, I think it's import to let the readers of the function know what the function mainly do first, insead of the edge cases.
In functional thinking, it's actually very helpful to think of the edge cases and get them out of the way first. When put in coding, I like to think it's more helpful to let the readers know the purpose of the function first, they could dig deeper later if they choose to.