I picked up some OCaml recently. At the start of my challenge (see “Songs of the OCaml Compiler”), I read through most of “Real World OCaml – Functional programming for the masses; 2nd Edition (Oct 2022)” by Anil Madhavapeddy and Yaron Minsky. OCaml’s type system was fresh for me, I’ve never used anything like it. I see its appeal.
I’ll soon put up some notes that’s specific to me, but for now here are my generic notes from the book. It’s mostly a compilation of the code snippets and some of my personal annotations as I read the book.
Disclaimer: this is directly dumped from org-noter, it’s best viewed on computer.
It’s a huge set of notes, so I had to break it up into sets of 5 chapters each. We can jump to individual chapters by clicking the links below.
Quick Navigation
Here’s the table of contents for us to jump to:
Resources
- Real World OCaml (textbook’s devsite) (online pdf resource here – what a time to be alive to see how this book got open access)
- the textbook’s github repo is found here
Legend
Here’s some tags that I’ll be using in this set of notes:
| Tag | Description |
|---|---|
| SPECIALITY | Language specific features that have some pros/cons to the language. |
| WITNESS | Cool way to do something, usually unrelated to the current topic. |
| LIMITATION | A limitation of OCaml. |
| FOIL | Point about a language feature made as a foil to how it’s done in other languages (e.g., Elixir, Python). |
| GOTCHA | Gotchas, no matter how silly. |
| RULE OF THUMB | Rules of thumb or opinions within the OCaml ecosystem. |
| CAUTION | A cautionary point. |
| TERMINOLOGY | Something pertaining to the accuracy of terms within the OCaml world. |
| IDIOM | A stylistic rule of thumb in OCaml. |
| PL-DESIGN | Something interesting about the design of the language. |
This is just a quick breadth-first exploration. On hindsight, I should make my notes more high-level instead of specific, could have saved some more time.