4 ms·
Generics being a form of a compiler only dependently typed lambda axis is still infinitely more complex than chaining product & coproduct (sum) data types.
by downvotetruth 4y ago
Generics being a form of a compiler only dependently typed lambda axis is still infinitely more complex than chaining product & coproduct (sum) data types.
- kibwen 4y agoPlease elaborate? Keep in mind that Rust isn't about making the simplest or most expressive language possible. Rather, it's about pushing the envelope on what sort of expressiveness we can soundly get away with while still benefiting from mechanical sympathy given the current state-of-the-art of optimizing compilers (and, also, while not being so foreign as to cause C-style language programmers to run away screaming).
- downvotetruth 4y agoIt's labeled "stable", but this seems to require a bit more understanding by implementers than simple composition to safely use, specifically the part about "where clauses [being] required when those bounds can be proven in the methods that construct the GAT or other associated types that use the GAT in the trait".