Interesting OCaml Articles

We published a blog post that might be interesting to OCaml devs.
When working with large codebases such as Tezos Octez, it is important to make the code highly readable.
Discover “labelled type parameters” - a lesser-known OCaml trick used by Nomadic Labs devs to reach this objective: Nomadic Labs - Labelled type parameters in OCaml


I’ve very recently written a blog post titled:

“My Thoughts on OCaml vs Haskell/Rust in 2023”

You can also discuss it here:

Hopefully you will find it interesting and worthy of being included in this thread!

Just for the record, there are multiple GC implementations for Rust, for example: GitHub - kyren/gc-arena: Experimental system for rust garbage collection

1 Like

I had fun reading Playing with Caml Light on DOS, published today (it is not obvious from the title).


This is not about OCaml per se but we see discussion about Unicode and its handling in OCaml repeatedly coming up. I found this article informative.


I just finished reading this. Thank you for posting. Can I please please please suggest you make a front-page article about it? And maybe put the “Conclusions” in the post, to kickstart discussion? I have to say: I was surprised to learn that even UTF-32 is not fixed-width.

ETA: we should all read this article. All of us. And I basically never write anything user-facing. Still, I’mm glad I read this.


Note that this article is still an approximation, in particular extended grapheme clusters don’t really match human-perceived characters because they can’t account for ligatures. For instance, a font renderer may decide to render aesthetic as æsthetic. Similarly, some scripts have a quite complex text layout where segmentation into individual characters is subjective: how many characters in द्ध्र्य, ශ්‍ර, :family_man_woman_boy:, or ﷺ ? Note that I can’t even predict the answer on your screen for the first two because it will depend on how well your system fonts support indic scripts, and typically on my system द्ध्र्य and द्ध्र्य are rendered with a different number of “characters”. And this is not even touching the issue of hieroglyphic control characters whose implementations are a work-in-progress … everywhere.


Yes, you know, text rendering hates you. Still, I’d say Unicode is nice, because it makes text rendering everyone’s interest (read: problem) instead of certain non-European language speakers’ one…


Today I’ve read a nice beginner-friendly blog post about pattern matching in OCaml with lots of examples:


The link above looks at how other languages deal with Unicode strings.