News for hackers. Stuff that matters.
Re:Rust: “Explain GATs Like I'm 5 Years Old” by josephcsible on Monday November 07, 2022 @12:37PM (#33509153)
Even if the use cases outside the standard library were weak, given that the work needs to be done anyway for the standard library, why wouldn't you expose them?
Re:Rust: “Explain GATs Like I'm 5 Years Old” by nrc on Monday November 07, 2022 @01:28PM (#33509969)
To be clear, there are not use cases in the std lib. The use case is as an intermediate representation for the compiler, and that is no motivation for inclusion in the language (in the same way that we don't have vtables or register allocation in the surface syntax)
Re:Rust: “Explain GATs Like I'm 5 Years Old” by wtetzner on Monday November 07, 2022 @03:07PM (#33511618)
Being able to have a generic "Mappable" trait seems like a good use case for the standard library. It's something I've wanted in the past, and was disappointed that it didn't exist.