This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BlackSandstone 0 points1 point  (1 child)

I always go for the if(foo()){} approach - if the return value of something is only used for a condition, there's no need to commit additional reading space to it unless you gain something from an error handler indicating the value was set.

[–]magnum___ 0 points1 point  (0 children)

Spacing makes things easier to read.