Hacker News new | ask | show | jobs
by nemith 2294 days ago
I like to call it Quack typing as interfaces are based on behavior and not attributes.
2 comments

No they aren't, they're matched based on method names.

Go isn't duck typed, except for interfaces which are. Pretty simple.

Structural subtyping can be based on attributes a la Python’s Protocols.