Best OCaml Book

Hello, I am completely new to OCaml, and I like learning programming languages from books. Are there any good books on OCaml that you could suggest?

OCaml is not my first language. I have some experience in functional programming languages like F# and Rust. Thank you.

Hello, see How do you stay productive in OCaml? - #5 by nojb for a list containing what I think are some good books (for various levels of experience).

Cheers,
Nicolas

5 Likes

I was considering https://dev.realworldocaml.org/, but does it give enough information? It’s pretty short.

I fully agree with @nojb and @crabs-can-code recommendations, but I think there are other two resources that are worth mentioning.

To learn the language itself, I find both John Whitington’s books quite good but maybe a bit slow paced if you have already some experience.

If you don’t mind studying it while studying algorithms and data structures the CS3110 course book “OCaml Programming: Correct + Efficient + Beautiful” is fantastic, and since 2021 also includes videos.

5 Likes