The Hyper Programming Language

Operator precedence

The precedence of operators is chosen in a way to be able to write expressions in a natural way. Most of the precedence of expressions in C++ and Java is the same in Hyper.

What follows are the different kinds of expressions, sorted from highest to lowest precedence. Literals are not included in this list. Expressions that are grouped together under the same number have the same precedence.

The operands of operators that are not short-circuited can be evaluated in any order. It is bad coding practice to depend on the order.

  1. Binary "->" operator
  2. Binary "&" operator
  3. Binary "|" operator
  4. Conditional operator "? :"

See also

Valid HTML 4.01 Strict Valid CSS!