3 ms·
In some languages like Go that support multi assignment, evaluation of some parts of the LHS occur first to help with pointer indirection and index clause evalu
by kodablah 8y ago
In some languages like Go that support multi assignment, evaluation of some parts of the LHS occur first to help with pointer indirection and index clause evaluation [0][1]. I assume this makes the multi assign predictable because the locations of the LHS are known before the RHS is started.
0 - https://golang.org/ref/spec#Assignments https://golang.org/ref/spec#Assignments
1 - https://golang.org/ref/spec#Order_of_evaluation https://golang.org/ref/spec#Order_of_evaluation