4 ms·
Go has duck-typed interfaces. It will make sure that only values implementing Animal will ever be used as an Animal anywhere. It's fully statically type-check
by cube2222 3y ago
Go has duck-typed interfaces.
It will make sure that only values implementing Animal will ever be used as an Animal anywhere. It's fully statically type-checked.
It's arguably one of the defining features of Go in general, and is what shapes much of the idiomatic code style.
- deleted 3y ago[deleted]