
Real World OCaml
Functional Programming For the Masses
by Yaron Minsky, Anil Madhavapeddy, Jason Hickey · first published 2013
142mentions
69recommended by
99HN commenters
2012–2026first – last mentioned
68% recommend27% neutral5% critical
Why HN recommends it
Practical, in-depth guide to OCaml and functional programming, with good setup and tooling advice and coverage of advanced features and the runtime. Suits beginners and experienced developers learning OCaml.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.
Read freeOnline edition





…huge asset. I'm surely biased, my main skillset is in Python so of course the low friction to a new language is more important to me rather than say, a Haskell user, or a Scala user. The 2nd edition of Real World Ocaml on Yaron Minsky's site is a great resource for me, though once multicore is actually stable and fully activated there will be still more learning to do. It's a really nice change to embrace types so…
on “Multicore OCaml: September 2020” ↗As I read the author's comparison, OCaml came to my mind as well. Reading Minsky's posts and the Real World OCaml book got me really interested in its capabilities for modern software development. I've heard mixed reviews about the object-oriented features, but the functional ones are solid, expressive, and easy…
on “Scala vs Go” ↗…make you confident to tackle larger and harder problems and maybe bring the fun back into programming. OCaml and Reason and BuckleScript is a great starting point - the community is nice and welcoming. Real World OCaml by Minsky, Madhavapeddy, and Hickey is a text with a lot of insights. You can also go straight to Haskell, but its web-browser story is not as good as OCaml's (thanks to BuckleScript). Or there is PureScript…
on “JSCaml: A compile-time transformation from JavaScript to OCaml” ↗Apart from being tied with Jane Street's libraries, Real World OCaml is "deeper" in that it also talks about implementation details. This book has a more "introduction to functional programming via OCaml" vibe. Both are good textbooks with different emphases. The main…
on “OCaml Programming: Correct and Efficient and Beautiful” ↗Wow, the first 5 comments on this were about should they use LLVM:) The author is currently writing a book about OCaml that is now available in alpha format from here: http://www.realworldocaml.org/ I've finished the first part and looked at the compiler section, and I love this book, no affiliation in any way.
on “Writing Performance Sensitive OCaml Code” ↗Real World OCaml is indeed awesome -- while it is free, if you do find yourself making good use of it, please also at least buy an ebook version. Totally worth its bytes in gold. (No affiliation, just an OCaml dilettante…
on “Beginner's guide to OCaml beginner's guides” ↗(Author of the article here) The stdlib that ships with the compiler is indeed minimal, though it is used for things other than the compiler. It can be used for other projects, but you probably want something more full-featured. Core, and the more minimal and portable Core_kernel (https://github.com/janestreet/core_kernel) is a full-featured alternative that is growing in popularity, and is wha
on “OCaml for the Masses (2011)” ↗The biggest change is OPAM, http://opam.ocaml.org/, a top-notch package management system that makes installing OCaml packages much easier. Shameless plug: there's also a newish O'Reilly book, Real World OCaml http://realworldocaml.org, which I think is a big help in learning the language. Oh, and there's OCaml Labs, a new lab at Cambridge University that's dedicated to improving the language.
on “OCaml for the Masses (2011)” ↗…on types but also on values simultaneously. F#, Haskell, and most others lack this but it would be great if they were to officially adopt it. OCaml is also very easy to learn and I seriously recommend Real World OCaml - it's free online and excellent.
on “Why OCaml, why now? (2014)” ↗OCaml is a great language. I'm so glad I was forced to learn at in university. Apart from the language itself, the ecosystem surrounding it is very mature as well. - OCamlbuild is the bee's knees. Configuring complex projects requires just one line in the Makefile - OPAM works wonderfully. No configuration required. Everything just works. - Merlin (https://github.com/the-lambda-church/merlin) i
on “OCaml 4.03.0 released (including flambda)” ↗This is so old, I personally wouldn't read it. If you want to learn Ocaml, probably the best current resource is Real World Ocaml v2: https://dev.realworldocaml.org/. It doesn't have good coverage of the not so real world things or the myriad of syntax extensions (mostly from Jane Street). The main auther is one of the original co-founders of Jane Street as well. The only reason I'm saying this is
on “Using, Understanding, and Unraveling the OCaml Language” ↗As an initial primer I would recommend Cornell’s Functional Programming class that teaches OCaml: https://www.cs.cornell.edu/courses/cs3110/2019sp/textbook/in... After that, I would recommend the new (beta) version of Real World OCaml — it gets a lot more in depth about more advanced language features: https://dev.realworldocaml.org/toc.html
on “OCaml is 25” ↗…working with it, to the point that I can make useful, large programs. I've learnt Haskell in the past and it was slow primarily because Learn You a Haskell is I think poorly written. Read Yaron's book Real World OCaml. It's great.
on “Why OCaml? [video]” ↗You probably want to go with https://dev.realworldocaml.org/ , which is a in-progress rewrite of v1.
on “Introduction to OCaml” ↗Your request for a super-opinionated guide "get stuff done" guide will be available soon; http://realworldocaml.org
on “Code iOS Apps in OCaml” ↗