1. 43
    1. 5

      I yearn for the day when Go removes all mentions of sort.Interface lol. Thanks for work BTW.

      1. 3

        I actually always really appreciated the cleverness of sort.Interface. It really showed what the language designers were going for.

        1. 4

          What were they going for?

          1. 2

            They were, as far as I can tell, trying to show the power of nominative types combined with interfaces.

    2. 3

      They finally fixed the ballast thing!

      1. 2

        I plan to continue to allocate an extra 100MB slab, for luck.

    3. 1

      What does that sort.Find do that is new ? Does it just give index number between 0 and N and generate those index by binary searching ? That’s IMO really weird interface ? Why not take a slice and a comparison closure taking one or two Ts and keeping the way the indexing works private ?

        1. 1

          Sure, those are the APIs I would expect. So I don’t understand what the sort.Find does that is “new” ? (except presenting a definitely weird interface to its user)

          It’s the “new” part of the statement I don’t understand. (and to a lesser degree, the interface design)

          1. 1

            It’s not “new” in that sense. Rob Pike just felt like sort.Search was too awkward, so he proposed a new function that’s maybe 10% less awkward. It’s the same functionality either way.

      1. 2

        You can use it for things other than slices. For example, you could use it to implement something like git-bisect