Re:400 days of Go
by stonemetal on Tuesday September 15, 2015 @11:05AM
(#10221052)
Not really, Go uses duck typing for interfaces. You declare an interface to require functions X, Y, and Z. Any type that has functions X, Y, and Z suddenly implements that interface whether you want it to or not.
[ Parent
| on HN ]
As I understand it, the correct term for that is "structural typing." Duck typing is similar, but applies exclusively to dynamic languages. See: https://en.wikipedia.org/wiki/Duck_typing#Structural_type_sy...