4 ms·
No doubt they'll needlessly spread to code that doesn't require them - happened already with async and that is much, much simpler concept (than one of the most
by aslak 4y ago
No doubt they'll needlessly spread to code that doesn't require them - happened already with async and that is much, much simpler concept (than one of the most complex things, GATs).
- yakubin 4y agoPersonally, I consider GATs a lot easier to understand than async. It doesn't transform my code into something completely different than I'm seeing. It's just the ability to put a generic parameter in one more place, paradoxically reducing the number of traits. It's something that you naturally try to write when you don't know it's not supported, rather than an additional thing to learn.
- jgilias 4y agoThis is different though. Async colors functions, so once you’ve got something that has an async interface, you either go async too, or have to do shenigans to use it in a blocking way. GATs will just let library authors make more flexible interfaces. If there’s anything to worry about then that may be compile times of complex codebases. I haven’t measured anything but just as a rule of thumb more generic code means longer compile times in Rust-land.