Programming Books

6 Excellent Free Books to Learn OCaml

Last Updated on May 22, 2022

4. Using, Understanding, and Unraveling The OCaml Language by Didier Rémy

Using, Understanding, and Unraveling The OCaml Language

Using, Understanding, and Unraveling The OCaml Language is a multi-dimensional presentation of the OCaml language that combines an informal and intuitive approach to the language with a rigorous definition and a formal semantics of a large subset of the language, including ML.

Throughout this book, the specific concepts and techniques are given rigorous theoretical justification. A sample of programming exercises with different levels of difficulty are included.

Chapters cover:

  • Core ML – with examples, formalize a very small subset of the language, and shows how to derive other constructs remaining in core ML whenever possible.
  • The core of OCaml – including type abbreviations, record types, mutable storage and side effects, and exceptions.
  • The object layer – starts with an introduction to objects and classes, then presents the core of the object layer, and ends with a few advanced uses of objects.
  • The module language – explores OCaml’s powerful module system.
  • Mixing modules and objects – discusses the overlapping of features and the specificities, and show how to use them in harmony.

Read the book

5. The OCaml system release 4.08 by Xavier Leroy, Damien Doligez, Alain Frisch, Jacques Garrigue, Didier Rémy and Jérôme Vouillon

The OCaml system release 4.08

The OCaml system release is the official User’s Manual. It serves as a complete reference guide to OCaml.

Updated for each version of OCaml, it contains the description of the language, of its extensions, and the documentation of the tools and libraries included in the official distribution.

The book covers:

  • An introduction to OCaml – gives an overview of the language.
  • The OCaml language – the reference description of the language.
  • The OCaml tools – documents the compilers, top level system, and programming utilities.
  • The OCaml library – describes the modules provided in the standard library.

Read the book

6. Developing Applications With OCaml by Emmanuel Chailloux, Pascal Manoury and Bruno Pagano

Developing Applications With OCaml

Developing Applications With OCaml is divided into four main sections that build upon each other.

Each section has a set of chapters that present some related concepts, followed by an “Applications” chapter that uses those concepts to create a few small applications such as a minesweeper game, a graphical interface library, a couple of different two-player games, a distributed robot simulation, and a basic HTTP servlet.

The book explores:

  • Language Core – complete presentation of the basic elements of the Objective Caml language looking into the functional core of the languages, a comparison between the “pure” functional and imperative styles, and the graphics library. This section then exhibits three applications: management of a simple database, a mini-Basic interpreter and a well-known single-player game, minesweeper.
  • Development Tools – describes the various tools for application development including compilation modes, main libraries, garbage collection mechanism, the use of tools for debugging and profiling programs. Later chapters address lexical and syntactic tools, how to interface Objective Caml programs with C, constructing a library and an application.
  • Application Structure – describes the two parts of organizing a program: with modules, and with objects.
  • Concurrency and Distribution – introduces concurrent and distributed programs while detailing communication between processes, lightweight or not, and on the internet.

Read the book

Pages in this article:
Page 1 – Real World OCaml and more books
Page 2 – Using, Understanding, and Unraveling The OCaml Language and more books

All books in this series:

Free Programming Books
AdaALGOL-like programming language, extended from Pascal and other languages
AgdaDependently typed functional language based on intuitionistic Type Theory
ArduinoInexpensive, flexible, open source microcontroller platform
AssemblyAs close to writing machine code without writing in pure hexadecimal
AwkVersatile language designed for pattern scanning and processing language
BashShell and command language; popular both as a shell and a scripting language
BASICBeginner’s All-purpose Symbolic Instruction Code
CGeneral-purpose, procedural, portable, high-level language
C++General-purpose, portable, free-form, multi-paradigm language
C#Combines the power and flexibility of C++ with the simplicity of Visual Basic
ClojureDialect of the Lisp programming language
ClojureScriptCompiler for Clojure that targets JavaScript
COBOLCommon Business-Oriented Language
CoffeeScriptTranscompiles into JavaScript inspired by Ruby, Python and Haskell
CoqDependently typed language similar to Agda, Idris, F* and others
CrystalGeneral-purpose, concurrent, multi-paradigm, object-oriented language
CSSCSS (Cascading Style Sheets) specifies a web page’s appearance
DGeneral-purpose systems programming language with a C-like syntax
DartClient-optimized language for fast apps on multiple platforms
DylanMulti-paradigm language supporting functional and object-oriented coding
ECMAScriptBest known as the language embedded in web browsers
EiffelObject-oriented language designed by Bertrand Meyer
ElixirRelatively new functional language running on the Erlang virtual machine
ErlangGeneral-purpose, concurrent, declarative, functional language
F#Uses functional, imperative, and object-oriented programming methods
FactorDynamic stack-based programming language
ForthImperative stack-based programming language
FortranThe first high-level language, using the first compiler
GoCompiled, statically typed programming language
GroovyPowerful, optionally typed and dynamic language
HaskellStandardized, general-purpose, polymorphically, statically typed language
HTMLHyperText Markup Language
IconWide variety of features for processing and presenting symbolic data
JArray programming language based primarily on APL
JavaGeneral-purpose, concurrent, class-based, object-oriented, high-level language
JavaScriptInterpreted, prototype-based, scripting language
JuliaHigh-level, high-performance language for technical computing
KotlinMore modern version of Java
LabVIEWDesigned to enable domain experts to build power systems quickly
LaTeXProfessional document preparation system and document markup language
LispUnique features - excellent to study programming constructs
LogoDialect of Lisp that features interactivity, modularity, extensibility
LuaDesigned as an embeddable scripting language
MarkdownPlain text formatting syntax designed to be easy-to-read and easy-to-write
Objective-CObject-oriented language that adds Smalltalk-style messaging to C
OCamlThe main implementation of the Caml language
PascalImperative and procedural language designed in the late 1960s
PerlHigh-level, general-purpose, interpreted, scripting, dynamic language
PHPPHP has been at the helm of the web for many years
PostScriptInterpreted, stack-based and Turing complete language
PrologA general purpose, declarative, logic programming language
PureScriptSmall strongly, statically typed language compiling to JavaScript
PythonGeneral-purpose, structured, powerful language
QMLHierarchical declarative language for user interface layout - JSON-like syntax
RDe facto standard among statisticians and data analysts
RacketGeneral-purpose, object-oriented, multi-paradigm, functional language
RakuMember of the Perl family of programming languages
RubyGeneral purpose, scripting, structured, flexible, fully object-oriented language
RustIdeal for systems, embedded, and other performance critical code
ScalaModern, object-functional, multi-paradigm, Java-based language
SchemeA general-purpose, functional language descended from Lisp and Algol
ScratchVisual programming language designed for 8-16 year-old children
SQLAccess and manipulate data held in a relational database management system
Standard MLGeneral-purpose functional language characterized as "Lisp with types"
SwiftPowerful and intuitive general-purpose programming language
TclDynamic language based on concepts of Lisp, C, and Unix shells
TeXMarkup and programming language - create professional quality typeset text
TypeScriptStrict syntactical superset of JavaScript adding optional static typing
ValaObject-oriented language, syntactically similar to C#
VHDLHardware description language used in electronic design automation
VimLPowerful scripting language of the Vim editor
XMLRules for defining semantic tags describing structure ad meaning
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments