3 ms·
As others have pointed out, you can get these in F# or OCaml, or Scala as well. Or at least variants of them. And for F# and Scala you will have the advantage o
by cmrdporcupine 3y ago
As others have pointed out, you can get these in F# or OCaml, or Scala as well. Or at least variants of them. And for F# and Scala you will have the advantage of an ecosystem of integrated libraries for .NET and the JVM respectively as well.
And honestly, TypeScript's union & intersection types are pretty nice and that language is nice and expressive.
Actually I actually routinely run up against expressiveness limits in Rust's enums in places where e.g. Scala would actually allow for a more static-declarative model (for better or for worse). I haven't worked in Scala in 15 years, but it was actually quite compelling.
- timeon 3y ago> And honestly, TypeScript's union & intersection types are pretty nice and that language is nice and expressive. It is such pain compared to Rust's enums. Wish there was more Rust front-end.