The ML family of languages are great for modeling thanks to sum types, exhaustive pattern matching etc. However, one aspect that’s still hard to grasp sometimes is modules, and how there are subtle differences compared to other languages we might be used to.
For example, for people coming from mainstream languages like TS, Rust etc. we are used to modeling things with interfaces/traits (adhoc polymorphism) and function overloading. Haskell can do these with typeclasses.
However, in the ML family of languages (OCaml, Rescript etc. which do not have modular implicits yet), we prefer more explicit behavior and the above would be achieved with functors or first class modules, Would there be any resources in Rescript for it? Are there any down to earth tutorials or resources recommended for beginners to think about domain modeling?
There seems to be some articles in F# or Ocaml, as well as books like Domain Modeling Made Functional. But for example in Domain Modeling Made Functional, they do not mention the word polymorphism or do not want to delve into functors. Curious to know if there are any pragmatic articles/resources around these topics for beginners 