3 ms·
How's the multicore and async story these days? I remember that was one of the big draws of F# originally, that it had all (or, most of) the type safety feature
by daxfohl 7mo ago
How's the multicore and async story these days? I remember that was one of the big draws of F# originally, that it had all (or, most of) the type safety features of OCaml but all the mutlicore of dotnet. (Plus it created async before even C# had it). Has OCaml caught up?
- sweetsocks21 7mo agoOCaml has full multicore support with algebraic effects now. The effect system makes things like async very nice as there's no function "coloring" problem: https://discuss.ocaml.org/t/ocaml-5-0-0-is-out/10974 https://discuss.ocaml.org/t/ocaml-5-0-0-is-out/10974 But I don't believe the effects are tracked in the type system yet, but that's on it way.
- lambda_foo 7mo agoThe type system for effects is an ongoing research effort. For now you get unhandled effect exceptions at runtime. With Multicore OCaml we gained thread sanitizer support and a reasonable memory model. Combined they give you tools for reasoning about data races and finding them. https://ocaml.org/manual/5.3/tsan.html https://ocaml.org/manual/5.3/tsan.html