Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My understanding from the “Featherweight Go” paper 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.


> My understanding from the “Featherweight Go” paper 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.


I think the comment above meant that the `any` keyword specifically is a synonym for `interface{}`, not that all generic types will be.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: