4 ms·
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 ext
by contravariant 3y ago
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.