3 ms·
The only thing similar about them is the acronym: GATs are generic type aliases which are defined inside traits. GADTs are generic sum types with extra constr
by Rusky 4y ago
The only thing similar about them is the acronym:
GATs are generic type aliases which are defined inside traits.
GADTs are generic sum types with extra constraints on which variants may be used with which type arguments.
There is no reasonable way in which they are "quite similar," nor do either of them have anything at all to do with affine types.