3 ms·
Sadly, after trying specialization and obsessing over GATs threads/issues, I've learned not to get my hopes up about such complex features with so many subtle i
by akiselev 6y ago
Sadly, after trying specialization and obsessing over GATs threads/issues, I've learned not to get my hopes up about such complex features with so many subtle implications landing in stable any time soon :( - I've still got PTSD from all the compiler panics.
> - it has unclear/non-trivial interactions with async-await transformation, mainly the generator does need support for multiple unsized values, which isn't supported by rust but can be archived through some hacks in that specific case.
This especially gives me pause. I've thoroughly enjoyed the async/await experience in Rust despite its rough edges but it seems the community's exploration of async/await is still in its early stages. It sounds that something as complex unsized rvalues will take a long while to get right (I don't know what I'm talking about though, so please correct me!)
- dathinab 6y agoYes, also just after posting I noticed you can't have unsized values living across await in generators without some major changes or something. The problem is that when you create a generator it doesn't yet know the unsized field it only knows it when creating it in a `poll` call. But it only will call poll after pinning the generator at which point you can't really grow the size of it for a bunch of reasons including that growing might move it in memory (realloc) which you can't due to self references... So you would need the size of the generator when generating it. Which could somewhat be possible but not really with current rust features, i.e. it would need a lot a special care.