Honestly that was the selling point of ReasonML to me. Share business domain types and share common code but also get a native compiled backend. The pattern matching, variants, and syntax of Rescript are quite nice but unfortunately I don't find it enough of a selling point for frontend code that (in my experience) does not benefit as much from those previous points as say writing compilers or parsers because the majority of what youre writing is interacting with 3rd party libs and components, building forms etc in React, for which the code ends up looking pretty similar in rescript-react.
Exactly. I could take the whole "generate API consumer client lib from API specification" out of the equation.
We tried doing this with darklang. It ended up not actually working that well (it took a lot of effort to have even a few shared types), and it didn't get us very much either.
I think I read your postmortem on that actually. Good stuff
Well technically I guess you could still have that via node, just not native as with the Ocaml compiler?
And via Deno as well.
I rather work with OCaml/httpaf[0] than with JS/express or what have you.