4 ms·
Do you think the keyword generics initiative will solve these issues? https://blog.rust-lang.org/inside-rust/2022/07/27/keyword-generics.html https://blog.rust
by cercatrova 4y ago
Do you think the keyword generics initiative will solve these issues?
https://blog.rust-lang.org/inside-rust/2022/07/27/keyword-generics.html https://blog.rust-lang.org/inside-rust/2022/07/27/keyword-ge...
- lmm 4y agoIf they take the time and effort to build a consistent underlying model, yes (though I think the only proven way to do that would be to implement proper higher-kinded types and then turn keywords like async into syntax sugar for those). If they just add a bunch of ad-hoc cases for the keywords that are visibly causing problems then they'll probably make the issue worse rather than better. Given Rust's history of missed opportunities with this kind of thing (NLL, try/?, async), I'm not particularly hopeful.
- cercatrova 4y ago> Given Rust's history of missed opportunities with this kind of thing (NLL, try/?, async) What happened with these? I'm out of the loop.
- lmm 4y agoThey're all addressing problems that would be solved elegantly with full higher-kinded types, but Rust has opted for narrow ad-hoc approaches instead.
- cercatrova 4y agoYou should write about this somewhere, or even on their GitHub RFCs, as it seems from what I've read that they don't want to have HKTs due to how it interacts with the borrow system (poorly, apparently) as it's not as easy as with Haskell or OCaml which are garbage collected.
- lmm 4y agoThey're aware, plenty of people have tried to convince them that full HKTs are what they need and they're wasting their time doing dozens of partial implementaions instead of biting the bullet and doing it properly. They've made their decision that they'd rather do partial incremental work, and I'm not even sure they're wrong (it could be that they'll need the experience of all these different partial approaches in order to figure out how to make their borrow system handle HKT safely). I just hope they'll find a way to migrate all this stuff onto a coherent foundation when they finally do implement full HKT.
- cercatrova 4y agoWell I'll be glad to see it when HKTs come out.