Comment by uranusjr

3 years ago

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