10-or.net

or

People say "or" to offer a choice. It connects two options and asks for one of them.

What a model may hear

Boolean logical OR programming and digital logic
Return true if at least one condition is true, and may short-circuit evaluation
Bitwise OR low-level programming and networking
Combine binary digits by setting a bit to 1 if either operand has that bit set
SQL OR operator databases and queries
Broaden a search to match any of multiple conditions, often changing result size dramatically
Regular expression alternation pattern matching and text processing
Match either the pattern before or after the pipe-like symbol, with order affecting priority

Where people and models part ways

“A or B”

Meant: Pick whichever of A or B works better

May be taken as: Treat as a logical operation that returns true/false rather than selecting an option

Say instead: “Choose the better of A or B, or explain why neither works”

“Do X or Y”

Meant: Do one of these, I do not care which

May be taken as: Execute both in sequence due to short-circuit misunderstanding, or reject as ambiguous

Say instead: “Do exactly one of X or Y, whichever you can complete first”

“Red or blue”

Meant: I am deciding between these two colors

May be taken as: Interpret as a bitwise operation on color values, or as a regex matching either string

Say instead: “Help me choose between red and blue for this purpose”

Tips

Often confused with

and
requires both, not either
xor
exclusive or, exactly one must be true
nor
neither, the negation of or
||
symbol form, often short-circuits in code
union
set operation, returns all elements from either
else
fallback when first option fails, not parallel choice