Re:I can't keep up with idiomatic Rust
by steveklabnik on Sunday April 12, 2020 @12:04PM
(#22849090)
How are GATs any less theoretically well founded than HKT?
I can see how maybe working toward that would be a priority in a PLT research sense, but Rust isn't that kind of language anymore. (This is my own opinion and I'm not on the lang team, mind you.)
> How are GATs any less theoretically well founded than HKT?
I'm not aware of their having been studied to the same extent, so I don't have the same level of confidence that they are well-behaved. For example, is there a known algorithm for doing perfect type inference in the presence of GAT? What about when we add in subtyping, or higher-rank types? Maybe it's all going to be fine, but the further you stray from the path that's been trodden by PLT research, the more I'd worry about falling down a hole.
Re:I can't keep up with idiomatic Rust
by steveklabnik on Monday April 13, 2020 @09:24AM
(#22855604)
Gotcha. My understanding was that they were, but not my area of expertise.
The choice to focus on GATs is exactly what I was thinking of. I think Rust will come to regret it, as it comes with most of the costs of full HKT but leads one into working with a limited subset that's not so theoretically well-founded, and I'm not convinced the forward-compatibility is as good as claimed (the semantics may extend to full HKT, but it pushes syntax in a direction that seems likely to make for a frustrating syntax for full HKT). I hope it ends up working out.