Logo

dev-resources.site

for different kinds of informations.

Link: OCAML 5 is Out + Effects Tutorial

Published at
12/17/2022
Categories
ocaml
rescript
adt
effect
Author
jesterxl
Categories
4 categories in total
ocaml
open
rescript
open
adt
open
effect
open
Author
8 person written this
jesterxl
open
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

effect Article's
30 articles in total
Favicon
Wrapping up 2024
Favicon
This Week in Effect - 2024-12-27
Favicon
Effect 3.12 (Release)
Favicon
Effect 3.11 (Release)
Favicon
Cause & Effect Podcast #1
Favicon
Mapping Operations in Effect-TS Optionals
Favicon
Using do Notation in Effect-TS Optionals
Favicon
Exploring Option Getters in Effect-TS
Favicon
Exploring Option Conversions in Effect-TS
Favicon
Using match with Option in Effect
Favicon
Using match with Option in Effect
Favicon
Effect in React
Favicon
Understanding Type Guards in Effect-TS: Ensuring Safe Option Handling
Favicon
Exploring Option Constructors in Effect-TS
Favicon
Introduction to Options in Effect
Favicon
Effects in Ember
Favicon
How we migrated our codebase from fp-ts to Effect
Favicon
Synthetic Turf Benefits: Cost-Effective Solutions for Public Spaces
Favicon
The Effect Tax
Favicon
Effect 3.0
Favicon
Effect Days conference on Feb 23, 2024 in Vienna
Favicon
Link: OCAML 5 is Out + Effects Tutorial
Favicon
How To Fade In And Out In Premiere Pro
Favicon
React - Don't update parent state in the rendering phase of the child
Favicon
Encoding HKTs in TypeScript (Once Again)
Favicon
Developing A Wrapper Around Node.Js FS
Favicon
Contentlayer & Effect — Architectural Patterns And Decisions.
Favicon
JavaScript photo efffect fun project
Favicon
Matrix (and perlish) background effect in Javascript :)
Favicon
Social Media Buttons with HTML and CSS ( blur effect ).

Featured ones: