4 ms·
There isn't an RFC for them, at least that I could find. Have they just not gotten that far in terms of thought?
by spott 12y ago
There isn't an RFC for them, at least that I could find. Have they just not gotten that far in terms of thought?
- steveklabnik 12y agoThat's right, there hasn't even been enough work for an RFC.
- jroesch 12y agoI think one of the core challenges is how traits play with HKTs. You can only allow for the defining of HKed type parameters and type arguments so many ways, but it becomes more complicated when dealing with the resolution of traits around HKTs. In Haskell for ex. there is no `Self` so the type class can easily be dispatched on a higher kinded type without needing a receiver type. In Rust `Self` must currently be fully applied as it is resolved from a value directly: `value.trait_method` and we pick our instance based on value's type. If we want to implement Functor (Mappable or w/e) we need to come up with another approach. I've thought about a few but they seem to play best with multi-dispatch + associated types + where clauses. I'm hoping to finish the RFC once all these features land and I can actually hack a prototype, instead of scribbling on paper.
- bjz_ 12y ago> I'm hoping to finish the RFC once all these features land and I can actually hack a prototype, instead of scribbling on paper. This would be amazing. One of the big issues blocking HKTs has been that though many folks want it there hasn't really been anyone willing to champion it yet. No pressure though - it is a tough problem.
- jroesch 12y agoYeah I'm game to be that person. I have been willing to work on it for months, but between school and making money to support myself to go to school time has been scarce. Feel free to bother me online, pressure is good.
- jroesch 12y agoI'm pretty sure at least a few people have ideas/are working on them. I have a 75% finished RFC that I have been sitting on because the language has been in such flux lately. I wouldn't be surprised if Niko, Aaron or someone else on the core team doesn't already have strong ideas about them.
- TheHydroImpulse 12y agoI have an RFC sitting here (and a few blog posts talking about it), but considering it'll be post 1.0 when such a thing is even entertained, I haven't submitted it. There are more pressing and more appropriate things to work on first.
- bjz_ 12y agoAwesome - looking forward to seeing that. :)