Hi,This is a good question because it comes up often even in very experienced teams. I've had code rejected in the past because I violated the "only one exit point" "rule". This is a style question and I have never supported this one exit point rule myself because it's not meaningful.
A function often has several exit reasons and making the developer mask this with one exit point is not conveying clarity.
I think its much better to clearly indicate each exit scenario with an immediate return, with the one exit point rule your code might reach a point where its just done, over, yet someone reading it likely won't know because the code is forced to artificially plod along until the end.
The reason for the one exit point rule is so that in more complicated code there is no mistake about how the program flows. With multiple exit points, you have to be very sure your conditionals all have the right exit point and sometimes that is harder to do then you might think.
With one exit point the programmer is forced to think out the code so that it always falls through to the end and has an exit value structure that is always the same.
Also, program maintenance is simpler because the reviewer does not have to figure out why each point is exiting, there's only one point that exits. It's almost like an electrical circuit if you have more than one output it's going to be more complicated than with just one output.
We could look at some code examples i guess to see the points to all this. One problem that comes to mind is when the code section exits in various places and it looks ok to add something that also exits early without noticing that there was an open file that never got closed before this new exit point.
I am sure you also know full well about the "goto" debacle. It can lead to very hard to read code sections. Structured programming is always the goal so that's the bottom rule really. The structure should be quickly understood.