|
|
|
|
|
by frou_dh
682 days ago
|
|
Python arguably has better support for working with sum-types (algebraic types) than TypeScript does, because the language actually has a `match` statement (since 2021). Define a sum-type as a Union of dataclasses and the static type-checker (Pyright) can even tell you when your pattern-matching statements are non-exhaustive. Do you track such developments, or spend the time dreaming up these elaborate theories? :) |
|