Y
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
IshKebab
2294 days ago
No they aren't, they're matched based on method names.
Go isn't duck typed, except for interfaces which are. Pretty simple.
link
throwaway894345
2294 days ago
Structural subtyping can be based on attributes a la Python’s Protocols.
link
Go isn't duck typed, except for interfaces which are. Pretty simple.