1. 24
    1. 9

      Don’t miss the link at the end for the upcoming encoding/json/v2 proposal. That’s a much more interesting change to most Go developers.

      https://github.com/golang/go/discussions/63397

      1. 1

        This announcement looks very similar to the math/rand/v2 proposal from last year – I have not read them closely enough to see what has changed. I’ve written about PCG64 DXSM (Lobsters), though I should probably amend that article to note that Golang’s pcg uses a slightly different variant with a 128 bit multiplier (instead of the 64 bit “cheap” multiplier) and a fixed increment.

        1. 1

          My only concern about */v2 is that those not “in the know” will continue to use the old version. I imagine it’s going to be a bit of a “which one do I use?” moment for new developers. I do hope that there’s some sort of static analysis that warns you to use /v2 packages when available (perhaps only for new code, but I don’t know how one would detect that)

          1. 2

            I think the plan is to eventually mark the old package as deprecated at which point various tools will point it out. But they didn’t want to mark the old one as deprecated in the same release as introducing the new one, because that’s annoying for Go code that supports multiple Go releases.

            1. 1

              Makes total sense.