4 ms·
I’d describe structural typing as a special case of duck typing FWIW.
by catlifeonmars 5mo ago
I’d describe structural typing as a special case of duck typing FWIW.
- 9rx 5mo agoI suppose. That special case is that it is evaluated statically, whereas duck typing is evaluated dynamically. That's the whole difference between them. They are otherwise identical concepts. But who is to say that dynamic evaluation isn't the special case?