Hacker News new | ask | show | jobs
by frou_dh 2282 days ago
OCaml, F#, Haskell, Elm, ... (anything with lightweight notation to define sum types [sometimes with only 1 variant], and a module system to limit who can construct them)

There's a whole well-reviewed book on exactly this: https://pragprog.com/book/swdddf/domain-modeling-made-functi...

1 comments

Rust and Swift can also be added to this list.