Skip to content

Short-Circuit Evaluation != Bitwise Operators #43

@erwingelissen

Description

@erwingelissen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions