DEV Community

Jesse Warden
Jesse Warden

Posted on

3

Link: OCAML 5 is Out + Effects Tutorial

OCAML 5 was released, and one of the features many on Twitter were happy about was effect handlers. I don't have much experience in Haskell, but one of the cool features it offers is you choose if something is an Error/Exception and the program should stop, or you should keep going.

Typically, if it's your code, that's no problem. However, if it's in a 3rd party library, or a module you didn't write, you have no choice to just "handle the error". Unclear how this doesn't leak implementation details, but I'm super n00b at Effect handlers (a la Unison). Really cool to see it be used as a primitive to create async/await, streams, and Go-lang-like imperative style shared concurrency with all the type guarantee's OCAML gives you. I wonder when ReScript will enhance async/await to handle Effects (or maybe you already can).

Effects Tutorial: https://github.com/ocamllabs/ocaml-effects-tutorial

OCAML 5 Announcement: https://discuss.ocaml.org/t/ocaml-5-0-0-is-out/10974

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay