[Adium-devl] Early Returns and the Coding Style Docs
Colin Barrett
timber at lava.net
Tue Mar 28 13:07:16 UTC 2006
On Mar 27, 2006, at 10:46 PM, David Smith wrote:
> What do people think of this? Am I in a minority here in liking
> early returns? (I know I'm a minority in liking braces on their own
> lines, I'm not even trying to argue that one anymore ;) )
While it's true the second example has less indentation depth, I
found the first example to be easier to follow on a cursory
examination of the code.
I don't have a problem with returning on the precondition, especially
if it's got a nice comment ;). That makes perfect sense. What I'm
objecting to is the use of continue. I think it makes it a bit more
difficult to just quickly scan the code and determine what's going
on. But that's just me.
-Colin
More information about the devel
mailing list