2 ms·
I've been rather worried about the state of parallelism or concurrency in Ocaml, two conecpts which I have little understanding of, but the rumours of the insuf
by etplayer 9y ago
I've been rather worried about the state of parallelism or concurrency in Ocaml, two conecpts which I have little understanding of, but the rumours of the insufficiency in support in the Ocaml compiler/interpreter have offput me from using Ocaml.
Would someone be so kind as to shed some light on this issue for me? Does it affect, say, a web server implemented with OCaml? What about a program in which some background process is used to prepare something simultaneously to the main process, like loading assets for a game?
- yawaramin 9y agoIt's not a problem in practice. OCaml has great concurrency support, which is what you need for applications that do IO, like servers. For CPU-bound applications like number-crunching, you take advantage of existing bindings to C or Fortran libraries. For a thorough discussion, see https://discuss.ocaml.org/t/7-years-after-is-ocaml-suitable-to-write-networking-servers/639 https://discuss.ocaml.org/t/7-years-after-is-ocaml-suitable-... Also remember that with BuckleScript, you're deploying to JavaScript, which is single-threaded by definition. OCaml's runtime model (modular, single-threaded, strictly-evaluated) maps beautifully to JavaScript.