Joe Tsai

Results 378 comments of Joe Tsai

@bcmills Being able to mutate a string feels pretty unsafe to me. The motivation for this proposal comes from the fact that we can't efficiently call a non-mutating `string`-based argument...

I just filed #57072 as a compiler optimization to somewhat obviate the need for this.

#20881 is also another compiler optimization that would address the need for this. If that was fixed, then we could always do: ```go utf8.DecodeRune([]byte(in)) ``` regardless of whether `in` was...

Given that "math/rand/v2" set the precedence for v2 packages, one could now imagine a "unicode/utf8/v2" package that has similar API, but generic versions: ```go package utf8 // unicode/utf8/v2 const RuneError,...

The `parseNumber` function is internal to the package and only parses a JSON number out of the front of the input. Is this somehow resulting in a bug in the...

Thanks, I recommend next time filing the buggy observed behavior rather than pointing at a particular internal function. The behavior of `parseNumber` is correct. I suspect the problem is actually...

For now, I just had it return an `expvar.Map` instead of an `metrics.Set`. The caller can convert the type manually. The `expvar` package is a lighter dependency.

I'm not sure I see the need for this. If `PeekKind` ever returns `KindInvalid` (which signals an error of some kind), then it guarantees that a subsequent call to `Read`...