Re:Proposing a Struct Syntax for Python
by contravariant on Wednesday June 14, 2023 @04:49PM
(#36332435)
It doesn't seem that far off though, it does have a union type and with pattern matching you can achieve pretty much the same thing (sure you may need a few extra classes if the types aren't distinct already but that seems like a small difference).
I don't know if type checkers can figure out if a pattern match statement is exhaustive yet though, that would be interesting.
I don't know if type checkers can figure out if a pattern match statement is exhaustive yet though, that would be interesting.