Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Short-Circuit Evaluation != Bitwise Operators #43

Open
erwingelissen opened this issue Dec 8, 2016 · 0 comments
Open

Short-Circuit Evaluation != Bitwise Operators #43

erwingelissen opened this issue Dec 8, 2016 · 0 comments

Comments

@erwingelissen
Copy link

In chapter 6 section combining-comparisons: "Comparisons can be combined using the boolean operators && (and) and || (or)."

I think it would be better not to blend the Bitwise Operators (& and |) with the operators for Short-Circuit Evaluation (&& and ||). The Bitwise Operators require both operands to be Boolean values. When using the Short-Circuit operators then the last operand can be any random expression.

	julia>> 2) &< 3)
	false

	julia>> 2) |< 3)
	true

	julia>> 2) && println("Short-Circuit Evaluation")
	Short-Circuit Evaluation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant