3 ms·
> I hope Rust can get higher kinded types through higher ranked trait bounds but for types, not just lifetimes, which would be equivalent to HKTs in other langu
by leshow 4y ago
> I hope Rust can get higher kinded types through higher ranked trait bounds but for types, not just lifetimes, which would be equivalent to HKTs in other languages. I don't believe generic associated types are fully equivalent to HKTs necessarily but type level HRTBs should fill that gap.
In service of what though? I love Haskell and HKTs, but Rust is a different language and I don't find myself actually reaching for HKTs, even when writing libraries.
Just my personal opinion, I think adding these features would be to Rust's detriment. I am happy to do my exploration into more complex type level features in another language in order to not add everything and the kitchen sink to Rust.
- satvikpendem 4y agoIt's more like many features are almost there but not quite and then do something differently. GATs are almost HKT but not quite and they're Rust specific rather than based in a common theory like category theory that many languages implement. Keyword generics are also almost like algebraic effects but not quite. It's more that I want Rust features to go all the way rather than do something 80% and in a different way than what other languages might commonly do.