4 ms·
Structural typing is facially similar to duck typing when anonymous types (interfaces and structures) are allowed, as in OCaml. I don't believe either exists in
by masklinn 13y ago
Structural typing is facially similar to duck typing when anonymous types (interfaces and structures) are allowed, as in OCaml. I don't believe either exists in Go.
- burntsushi 13y agoThey are absolutely allowed. [1] You can have anonymous structs in a similar fashion. [1] - http://play.golang.org/p/tHYLcdbPSS http://play.golang.org/p/tHYLcdbPSS