4 ms·
Hard/confusing for user programmers, or for language designers? I don't think the concept being tricky for users is what is preventing adoption of HKTs. The &|x
by kortex 5y ago
Hard/confusing for user programmers, or for language designers? I don't think the concept being tricky for users is what is preventing adoption of HKTs. The &|x| hints at some of the reasons why implementing HKTs in Rust is tricky (not impossible). They are naturally very abstract, and if a structure is to be compiled in Rust, it (and its lifetime) needs to be reified. That is no small feat. See also: the difficulty with callbacks/anonymous closures in Rust.
- asimpletune 5y agoYeah that’s a good point. I don’t really know the real reasons. Maybe it’s just hard to do it and to have the 0 cost abstractions? Hopefully not impossible though.