Hacker News new | past | comments | ask | show | jobs | submit login

Structural typing is a static equivalent of dynamic duck typing. It is compatible with type checkers. Protocols mentioned in the article work without inheritance. A duck doesn't need to know that there is SupportsQuack protocol. If it quacks, it passes the type checks.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: