Travis Bischel
Travis Bischel
I don't think so. This is doing deep sorting on struct fields (admittedly this is not a high priority package). If the field is a slice, I check the inner...
Interesting, yes I think this is a duplicate of #43732. Does the CL linked take care of methods? I don't see a change in `methodReceiver`, which was the remaining allocation...
Adding the ability to specify the output slice removes allocations for non-method function calls. For methods, there still is an allocation to create a method pointer. Since `call` immediately uses...
I think `reflect.Caller` is a nifty idea: the method pointer is allocated once, and function lookups are cached (and this work eliminated) across repeated invocation. I'm not sure what the...
+1 to the current API. How is this avoiding allocations on the return slice?
I've used this pattern extensively ever since I learned of it. It did seem odd at first blush. Nowadays it feels similar to an inline defer, if that makes sense....
Interesting. In that case, I do still recommend officially defining the current behavior as per cmd/compile. Looking through code I have checked out with the rather lazy `rg --pcre2 'return...
Another way to frame it might be, "when multiple expressions appear on the right hand side of an assignment or return statement, evaluate all operations that can modify an expression...
I agree that "evaluate all expressions in left to right order" is much simpler to reason about. Potential points in favor of being more complicated are, * People are already...
Broadly speaking, I think this issue can be generalized to this sentence in the spec, "However, the order of those events compared to the evaluation and indexing of x and...