Consider the following contrived example:
void HandleThat() { ... }
void HandleThis()
{
if (That) return HandleThat();
...
}
This code works just fine, and I'm fairly sure it's spec-valid, but I (perhaps on my own) consider this unusual style, since the call appears to return the result of the function, despite the fact that both functions are prototyped to be void.
Typically, I would expect to see:
if (That) {HandleThat(); return;}
which, I feel, leaves no ambiguity as to what's going on.
SO community, can I get your opinion on whether the returning-void coding style is confusing or problematic? It has the feel of an idiom; should I use this or avoid it?
Generally I'd strive for clarity and use the second style. On the other hand, there's a neatness to the first form that draws me to it somewhat.