Exceptions are Ok
Let's look at how Results and Exceptions stack up to each other, and against ideal error handling ergonomics.
Nov 9, 2024 • Leandro Ostera
Parsing with Binary String Pattern Matching
I want to show you a glimpse of what it could look like when you parse it binary string pattern matching in OCaml like you'd do on Erlang, Elixir, or…
Dec 31, 2023 • Leandro Ostera
Unix Module Considered Harmful
Recently I was working on a socket pool for a new scheduler for OCaml 5 (multicore baby!) and I ran into a strange issue.
Nov 29, 2023 • Leandro Ostera
Type-safe state machines using type-state
Tired of writing state machines full of invalid transitions? Type-state may be what you're looking for. In this issue of Practical OCaml we show you how…
Aug 29, 2023 • Leandro Ostera
A quick guide to GADTs and why you ain't gonna need them
Ever wanted to use a GADT but did not know if you really needed them? You probably don't. And here's why.
Aug 28, 2023 • Leandro Ostera
Exploring domains in OCaml is cheaper and faster
You've heard of Domain-Driven Design, now buckle up for Type-Driven Domain..wait. Typed Domains Driving...nevermind. We're gonna use Only Types to…
The Best OCaml is the Worst OCaml
NOTE: This started as an OCaml type-system thing and ended up as a library design and documentation copy UX thing.
Feb 14, 2021 • Leandro Ostera
Why Typing Erlang is Hard
Follow the discussion on Hacker News
Nov 6, 2020 • Leandro Ostera