4 ms·
It works the other way too; the implementation is not obligated to pass an interface value to a function. The interface can be monomorphized too, if the compile
by jerf 5y ago
It works the other way too; the implementation is not obligated to pass an interface value to a function. The interface can be monomorphized too, if the compiler saw fit, and it would be a compliant implementation.
At the language level, it's a useless use of generics. Even if generics someday used a monomorphic implementation, the compiler would be able to translate those two things back and forth trivially.