From f05a91e18b4a3e1e962e1013cbf6ab16e120d190 Mon Sep 17 00:00:00 2001
From: Robert Griesemer
-When evaluating the elements of an assignment or expression,
-all function calls, method calls and
+When evaluating the operands of an expression,
+assignment, or
+return statement,
+all function calls, method calls, and
communication operations are evaluated in lexical left-to-right
order.
Order of evaluation
x
and the evaluation
of y
is not specified.
+a := 1 +f := func() int { a = 2; return 3 } +x := []int{a, f()} // x may be [1, 3] or [2, 3]: evaluation order between a and f() is not specified ++
Floating-point operations within a single expression are evaluated according to the associativity of the operators. Explicit parentheses affect the evaluation