I think it is, though this is a bit lawyery.

> Otherwise, 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.

This does not mention type conversions, so they are free to happen in
another order.

Generally though, if you want to guarantee ordering, use the power of
';'.


On Sun, 2018-04-08 at 17:22 -0700, [email protected] wrote:
> I think https://golang.org/ref/spec#Order_of_evaluation is going to
> explain 
> this situation, but I had hard time understanding.
> 
> Is current behavior consistent with language spec?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to