4 ms·
Python arguably has better support for working with sum-types (algebraic types) than TypeScript does, because the language actually has a `match` statement (sin
by frou_dh 2y 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? :)
- 1attice 2y agoNot particularly (point taken), but I _do_ note that describing a napkin-sketch as an 'elaborate theory' is perhaps more flattering than you mean it to be ;)