3 ms·
I am over 30 and I don't understand the explanation. Probably because first and foremost I don't even know what a "GAT" or "GATs" are/is.
by hitpointdrew 4y ago
I am over 30 and I don't understand the explanation. Probably because first and foremost I don't even know what a "GAT" or "GATs" are/is.
- kibwen 4y ago"Generic Associated Type". Explained in other terms, a generic is just a parameter for types, analogous to how `x` is a value parameter for the function call `foo(x)`. Meanwhile, an associated type is just a type alias that's associated with a trait (a trait is a class, but with no state), similar to how traits can have associated functions (which are also known as "methods"). GATs, then, "just" let you use generics in associated types, which was previously unsupported in Rust.