4 ms·
For the moment, you can see the progress on empowering the type system in the RFC for generic associated types, which is intended both to be the simplest extens
by kibwen 8y ago
For the moment, you can see the progress on empowering the type system in the RFC for generic associated types, which is intended both to be the simplest extension to the type system that allows for some important patterns (e.g. streaming iterators and collection traits) and to be forward-compatible with any additional extensions in the direction of HKT. Importantly, it's also intended to be intuitive for users who have no prior experience with higher-kindedness and usable without (hopefully) requiring anyone to learn anything about type theory. The RFC text can be read at https://github.com/rust-lang/rfcs/blob/master/text/1598-generic_associated_types.md https://github.com/rust-lang/rfcs/blob/master/text/1598-gene... and comments can be left on the tracking issue at https://github.com/rust-lang/rust/issues/44265 https://github.com/rust-lang/rust/issues/44265 .
- steveklabnik 8y agoNote also that HKT and do notation are their own separate things; you can have HKT without do notation. That's all HKT stuff, not do notation stuff.
- chongli 8y agoIf you have HKT then isn't do notation a piece of cake? It just desugars into monadic bind and return operators. Or is there something specific to rust that would mess with that?
- pcwalton 8y agoImperative control flow, for one. Think about how you would implement "break" that can break out of multiple nested loops in do-notation…
- steveklabnik 8y agoPlease see my comment here: https://news.ycombinator.com/item?id=17537878 https://news.ycombinator.com/item?id=17537878
- dagenix 8y agoI thought I had read at some point that generic associated types we're equivalent to HKTs in terms of what they can express. Or maybe that they were theorized to be so. Is that not the case? (Not critical, just curious)