2 ms·
Agreed. I don't have much Rust experience, but I do know Scala and Haskell and Typescript. It's one of those patterns that just comes up again and again and it
by paulddraper 4y ago
Agreed. I don't have much Rust experience, but I do know Scala and Haskell and Typescript.
It's one of those patterns that just comes up again and again and it's wonderful when the language offers a good solution.
- auggierose 4y agoAnd I must say that Typescript has the most flexible variation of it. I remember a while ago (> 10 years) that somebody on Lambda the ultimate asked how to flexibly represent compiler intermediate representations using the Scala type system, given that there can be many of them with overlaps. These overlaps are not a problem at all in Typescript.
- paulddraper 4y agoTypescript has discriminated unions, which are amazingly nice