Skip to content

Don't leave eval via next #17

Closed
wants to merge 1 commit into from

3 participants

@dominikschulz

Eval is not a loop and as such should not be left
using loop control statements.

This commit replaces those next statements with return
statements. The control flow should be exactly the same
since the enclosing loop will move on to the next iteration
after a successfull return from the eval.

@dominikschulz

Actually the build didn't fail ... travis failed.

@abh
djabberd member
abh commented Oct 7, 2012

Why return 1 instead of just return?

@dominikschulz

Usually "return 1" is used to indicate that something was successful. In this case it is used to indicate that the option was successfully processed. We could use a bare "return" instead, but that could possible lead to confusion in the future.

I've seen plenty of examples where a little more verbosity would have prevented serious bugs, but I'd be fine with a bare return, too.

Please advise.

@dominikschulz

Ok, so bare return it is. I'll update the PR ASAP.

@dominikschulz dominikschulz Don't leave eval via next
Eval is not a loop and as such should not be left
using loop control statements.

This commit replaces those next statements with return
statements. The control flow should be exactly the same
since the enclosing loop will move on to the next iteration
after a successfull return from the eval.
1b54a71
@dominikschulz

Using bare returns as per request and rebased to latest HEAD.

@yannk
djabberd member
yannk commented Oct 13, 2012

done

@yannk yannk closed this Oct 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.