This is a created article in which the information may have evolved or changed.
In Go specs, there are three points in this statement:
1. The evaluation Order (evaluation order) of the initialization expression (initialization expressions) in the variable declaration (variable declaration) is dependent by the initialization (initialization dependencies), but the evaluation of the operands inside the initialization expression needs to be in the order of 2: from left to right;
2. In a non-variable initialization statement, when the operands in an expression, an assignment statement, or a return statement are evaluated, the functions (function) calls, method calls, and communication operations contained in the operands (primarily for channel) are syntactically The order is evaluated from left to right.
3, the assignment statement evaluation is divided into two stages, the first stage is the index expressions on the left side of the equal sign, the pointer indirections and the expression to the right of the equals sign in the order of evaluation of the operands in 2 from left to right, and the second stage in left-to-right order of the variable assignment.