Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The most dominate use (these days, at least) is to implement structural typing (a la Protocol), i.e. conforming to a “shape” without actually inheriting anything. So yeah, it’s not particularly useful for day-to-day use, but still a hook needed to make certain nice things happen behind the scenes.


it allows fast unpacking and parameter retrieval align with the usual type checks.

the other day, this allowed me to refactor a 300L in 50 which are actually readable




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: