1. 66
  1. 16

    GATs are pretty huge right? I feel like I’ve seen “we could do X if we had GATs” all over the place.

    1. 9

      It will allow us to specialize our callbacks with their owning type and therefore rely on static dispatch instead of dynamic dispatch.

      1. 4

        That’s pretty sick, in what context if you can share?

        1. 1

          Callback evaluation for asynchronous I/O through a bespoke I/O runtime. Think something like Socket<Delegate> where Delegate is your callback-handling trait, in places where you have a HttpProtocol that specializes on Socket and needs to self register as the Delegate. Impossible without HKT, but GATs enable this with a little trait tomfoolery.

      2. 7

        The funny thing is at last job I needed GATs to do something tricky. Now for the life of me I can’t remember the details, but it’s a pretty big deal to have associated types that are easily generic. Just the lending iterator alone can allow things that are rather simple in scripting languages but restricted in earlier versions of rust.

        1. 7

          I need GATs so the Presto client library can go stable instead of nightly only.

          1. 3

            This is the client I’m talking about: https://github.com/nooberfsh/prusto