Hacker News new | ask | show | jobs
by nextaccountic 1711 days ago
Something I rarely see addressed: why was multicore ocaml blocked on having full-fledged effects? Couldn't multicore have landed years ago, and then gradually insert effects in the language?
2 comments

Multicore upstreaming wasn't blocked on having fully-fledged effects. If you look at the diff between multicore 5.00 and trunk OCaml, the changes required for fibers is pretty small relative to the multicore GC and making the rest of the runtime thread-safe.

The original plan was to upstream only the multicore GC. This was sped up on the suggestion of the core developers and now 5.0 will bring parallelism and effect handlers (though without syntactic support for the latter).

https://discuss.ocaml.org/t/multicore-ocaml-september-2021-e... has a good explanation of effect handlers, syntax and what will be available in 5.0.

Seems to me this multicore journey was quite a barn burner; might as well have gone all the way to linear types as your GC.
I guess to avoid nuking the ecosystem Python 3 style.
Which also didn't add multicore support, it still has a GIL. But it has been an extremely valuable lesson for other systems, so there's tha.