BTW, another problem: are the function calls appearing in a composite literal evaluated by their lexical left-to-right order?
On Tuesday, March 20, 2018 at 11:45:02 AM UTC-4, T L wrote: > > The Go specification only says > > In a function call, the function value and arguments are evaluated in the > usual order <https://tip.golang.org/ref/spec#Order_of_evaluation>. > > The usual order is explained here: > https://tip.golang.org/ref/spec#Order_of_evaluation > But I am not clear on what the usual order means for argument evaluation > order. > Does it mean the function calls in the argument list are evaluated by > their lexical left-to-right order? > Beside this guarantee, no other guarantee exist. > > For example, for this function call > > f(g(), a[1], h(), m["abc"], q()) > > g() is evaluated before h(), and h() is evaluated before q(), > but the evaluation order of a[1] and m["abc"] is not specified? > -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.