Re:Is Go Duck-Typed?
by int_19h on Thursday March 05, 2020 @04:41AM
(#22492227)
On JVM level, yes. But on Java level, the type of the method is structurally matched to the type of the interface.
[ Parent
| on HN ]
The name of the function is typically the same though, even with structural typing. This doesn’t seem quite like that.
If you mean the name of the function in the interface, it's basically ignored in this pattern, similar to how argument names are ignored. The entire interface definition should be treated as a function type with some redundant metadata.