Remix.run Logo
Generic Methods in Go 1.27(dominik.info)
16 points by EspressoGPT an hour ago | 1 comments
tancop 33 minutes ago | parent [-]

> Go’s interface system works at runtime. The specific type of a value passed into an interface parameter is resolved while the program runs. This dynamic dispatch clashes with generics being resolved at compile time.

What if the compiler generated both vtable and monomorphized variants for each method? Most calls would use the static version but places that need it like interface generics call the virtual method.