Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
nemith
· 6y ago · 0 comments
I like to call it Quack typing as interfaces are based on behavior and not attributes.
Comments
[–]
IshKebab
6y ago
No they aren't, they're matched based on method names.
Go isn't duck typed, except for interfaces which are. Pretty simple.
[–]
throwaway894345
6y ago
Structural subtyping can be based on attributes a la Python’s Protocols.