Hacker News new | ask | show | jobs
by lilactown 1275 days ago
Is there a guide on how to use the new constructs? The link to the 5.0 docs was broken on the site, and after manually fixing the URL all I found was some type annotations in the `Effects` module.
5 comments

The link to the Effect section of the manual at https://v2.ocaml.org/releases/5.0/manual/effects.html works for me and should contain an higher level description of what are effect handlers. Which link was broken for you?
I also didn't think to look in the "language extensions" section of the manual, instead going to the API docs and clicking on the "Effect" module.

This looks much more interesting, on a skim. Thanks!

The "Manual" link on this page https://ocaml.org/releases is broken
This is fixed now, thanks!
Make sure to check out the new chapter on parallelism too that is linked from the release notes: https://v2.ocaml.org/releases/5.0/manual/parallelism.html
The Effects module is kind of low level right now, as it understand it. You should like at Eio for a library that gives you nice fibers and non blocking IOs on top of effects! It's a neat library.
> like at Eio

Look at Eio here: https://github.com/ocaml-multicore/eio

IIRC, while they added the underlying language support for effects to this version to get the multicore support working, the standard library support for effects isn't really ready yet, so you may want to hold off another year or so.

I think eventually it will hopefully turn into something like what languages like purescript have which would be really cool.

(I've only used ocaml a tiny bit and use f# a lot more but I keep periodically checking the status of this because it's something that would make ocaml a lot more interesting to me.)