|
|
|
|
|
by FullyFunctional
3045 days ago
|
|
Well, O'Caml and Haskell predates Rust by decades. I was delighted to see Sum-Product types in Rust when I played with it. They go a long way to cleanly model the problem domain. Obviously you can simulate them, but it's much easier to get wrong or "cheat" (say having a bunch of fields, only some of which are valid depending on a tag). |
|
Umm yeah, they've been a part of every ML-family language since the '70s, OCaml, Haskell and Rust included.