3 ms·
My understanding from the “Featherweight Go” paper https://arxiv.org/abs/2005.11710 https://arxiv.org/abs/2005.11710 is that generic types will not simply be a
by fanf2 6y ago
My understanding from the “Featherweight Go” paper https://arxiv.org/abs/2005.11710 https://arxiv.org/abs/2005.11710 is that generic types will not simply be a synonym for interface{} because the compiler will be able to monomorphize them - they do not require dynamic dispatch like interfaces.
- oconnor663 6y agoI think the comment above meant that the `any` keyword specifically is a synonym for `interface{}`, not that all generic types will be.
- mseepgood 6y ago> My understanding from the “Featherweight Go” paper https://arxiv.org/abs/2005.11710 https://arxiv.org/abs/2005.11710 is that generic types will not simply be a synonym for interface{} The `any` constraint is a synonym for the `interface{}` constraint.