Carlana
Carlana
The one function I find myself still regularly missing is the equivalent of maps.DeleteFunc. I understand why slices.Filter isn’t in the package (yet?), but an in place filter would be...
ISTM, this is blocked until #56413 is resolved, then it should just return an iterator. Suggested name `errors.BreadthFirst`.
Assuming iterators are added to a future version of Go, there could be a new proposal to add errors.Iter or whatever to walk the error tree if people can show...
I think it's worth adding documentation to slices.Sort that sorting a float won't work. Maybe also there could be a comparator function in sort.
That seems good to me. In #50340 I think there was talk about adding sort.Compare which would take a comparable and return -1, 0, 1. If something like that is...
> What if instead, we provided a function in the `math` package like: Should FloatCompare go in math or sort? I can see the case for either. ISTM, if we...
That makes sense to me. My only other thought is that `math.Compare(a, b float64) int` would also make sense since all the functions in math take float64.
My feeling is to just provide the float64 API under the name math.Compare, and wait until math/v2 to provide a generic version along with generic everything else.
My preference is for the closure, one argument form. In the cases where you do use a closure instead of a method, the two argument form ends up being confusing...
```go type T = func() func Default(a, b T) T { var zero T if a != zero { return a } return b } ``` This code doesn't compile...