In the above clojure code, there is one function, defined in such a way that part of the code runs server side and parts of the code runs client side.
Using jsoo, and the oscigen library, is it possible to do the above with OCaml ? The goal here is to have the “network plumbing” be taken care of by the compiler.
Yes, check this page: All Ocsigen in one page
The section: ‘Eliom: client-server apps’
Eliom can transform OCaml into a multi-tier language, allowing one to implement (both the server and client parts of) a distributed application entirely in OCaml, as a single program. This greatly simplifies communication between server and client.
1 Like
I don’t know of anything like that, but there are several papers explaining and showing examples of the ideas: Research papers (descending order of newest to oldest)