Yes that’s exactly the type of modeling in question! Would also love to experiment with Rescript on the backend side with DDD / Clean code layers (especially on the edge running multiple instances of the software where reliability is important without going as far as to using Rust) Very interesting point about how Rescript is used more for the frontend so these questions arise less. Actually curious to know if we have a lot of examples of Rescript being used somewhere else like in servers, etc.
And you hit the nail with DDD and how functors seem to be the answer to modeling some of these relationships! I’m still trying to get used to this pattern and wish there were more practical resources around it
Thank you for the reference of mirage-os, sounds like reading OCaml code will be the way to get more exposure