Jean-Marc Lasgouttes wrote:
Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Putting a break point at the last "}" of the method should work in any
case. At least it work with MSVC and it used to work with gdb last
time I tried (long time ago though).
IMO, the only valid reason to not return early is when you have common
code to execute at the end of the method.
I really hate when I have to go through the whole function just to see
whether there is some early return.
That's the opposite case :-)
Of course, allowing 'return early' in a method should mean that you can
be confident that there is no code at the end. But maybe you're right
that it's better to not leave room for interpretation.
Abdel.