Classes
This chapter was written by Leo White and Jason Hickey.
diff --git a/command-line-parsing.html b/command-line-parsing.html index 3cb4576c8..68c73b54a 100644 --- a/command-line-parsing.html +++ b/command-line-parsing.html @@ -1,4 +1,4 @@ -Command-Line Parsing
Many of the OCaml programs that you’ll write will end up as binaries that need to be run from a command prompt. Any nontrivial command line diff --git a/compiler-backend.html b/compiler-backend.html index 1180931a5..4addcb3fc 100644 --- a/compiler-backend.html +++ b/compiler-backend.html @@ -1,4 +1,4 @@ -
The Compiler Backend: Bytecode and Native code
Once OCaml has passed the type checking stage, it can stop emitting syntax and type errors and begin the process of compiling the diff --git a/compiler-frontend.html b/compiler-frontend.html index b53defc47..fbf21ffca 100644 --- a/compiler-frontend.html +++ b/compiler-frontend.html @@ -1,4 +1,4 @@ -
The Compiler Frontend: Parsing and Type Checking
Compiling source code into executable programs involves a fairly complex set of libraries, linkers, and assemblers. While Dune mostly diff --git a/concurrent-programming.html b/concurrent-programming.html index 72279251c..6357e33da 100644 --- a/concurrent-programming.html +++ b/concurrent-programming.html @@ -1,4 +1,4 @@ -
Concurrent Programming with Async
The logic of building programs that interact with the outside world is often dominated by waiting; waiting for the click of a mouse, or for diff --git a/data-serialization.html b/data-serialization.html index 97e9f574d..e6f475b82 100644 --- a/data-serialization.html +++ b/data-serialization.html @@ -1,4 +1,4 @@ -
Data Serialization with S-Expressions
S-expressions are nested parenthetical expressions whose atomic values are strings. They were first popularized by the Lisp programming diff --git a/error-handling.html b/error-handling.html index 999ec1320..47c12989d 100644 --- a/error-handling.html +++ b/error-handling.html @@ -1,4 +1,4 @@ -
Error Handling
Nobody likes dealing with errors. It’s tedious, it’s easy to get wrong, and it’s usually just not as fun as thinking about how your diff --git a/faqs.html b/faqs.html index a80940bcb..252a13e3d 100644 --- a/faqs.html +++ b/faqs.html @@ -1,4 +1,4 @@ -
Why do I need to provide my Github login details to add comments?
diff --git a/files-modules-and-programs.html b/files-modules-and-programs.html index ba0cf59e6..a51e2c916 100644 --- a/files-modules-and-programs.html +++ b/files-modules-and-programs.html @@ -1,4 +1,4 @@ -Files, Modules, and Programs
We’ve so far experienced OCaml largely through the toplevel. As you move from exercises to real-world programs, you’ll need to leave the diff --git a/first-class-modules.html b/first-class-modules.html index 4d07bae5e..1c57ee6ac 100644 --- a/first-class-modules.html +++ b/first-class-modules.html @@ -1,4 +1,4 @@ -
First-Class Modules
You can think of OCaml as being broken up into two parts: a core language that is concerned with values and types, and a module language diff --git a/foreign-function-interface.html b/foreign-function-interface.html index 9e8cc45eb..1c82bca00 100644 --- a/foreign-function-interface.html +++ b/foreign-function-interface.html @@ -1,4 +1,4 @@ -
Foreign Function Interface
This chapter includes contributions from Jeremy Yallop.
diff --git a/functors.html b/functors.html index 7a736e573..6e598503c 100644 --- a/functors.html +++ b/functors.html @@ -1,4 +1,4 @@ -Functors
Up until now, we’ve seen OCaml’s modules play an important but limited role. In particular, we’ve used modules to organize code into diff --git a/gadts.html b/gadts.html index bc3794a3a..48153e17c 100644 --- a/gadts.html +++ b/gadts.html @@ -1,4 +1,4 @@ -
GADTs
Generalized Algebraic Data Types, or GADTs for short, are an extension of the variants we saw in Chapter 6, Variants. GADTs are more expressive than regular diff --git a/garbage-collector.html b/garbage-collector.html index 14187f15f..a039f5270 100644 --- a/garbage-collector.html +++ b/garbage-collector.html @@ -1,4 +1,4 @@ -
Understanding the Garbage Collector
This chapter includes contributions from Stephen Weeks and Sadiq
diff --git a/guided-tour.html b/guided-tour.html
index 3f1232bdd..eb3232c28 100644
--- a/guided-tour.html
+++ b/guided-tour.html
@@ -1,4 +1,4 @@
- This chapter gives an overview of OCaml by walking through a series
of small examples that cover most of the major features of the language.
diff --git a/imperative-programming.html b/imperative-programming.html
index 3891adff2..fbe81da8c 100644
--- a/imperative-programming.html
+++ b/imperative-programming.html
@@ -1,4 +1,4 @@
- This chapter includes contributions from Jason Hickey. These instructions are aimed at readers of Real World OCaml,
though much of what you find here will be useful for anyone who
diff --git a/json.html b/json.html
index 6f2bb7075..d6fd01bfd 100644
--- a/json.html
+++ b/json.html
@@ -1,4 +1,4 @@
- Data serialization, i.e., converting data to and from a sequence of
bytes that’s suitable for writing to disk or sending across the network,
diff --git a/lists-and-patterns.html b/lists-and-patterns.html
index 03760e738..636a03895 100644
--- a/lists-and-patterns.html
+++ b/lists-and-patterns.html
@@ -1,4 +1,4 @@
- This chapter will focus on two common elements of programming in
OCaml: lists and pattern matching. Both of these were discussed in Chapter 1, A Guided
diff --git a/maps-and-hashtables.html b/maps-and-hashtables.html
index cddcdcfca..f67ae2d6f 100644
--- a/maps-and-hashtables.html
+++ b/maps-and-hashtables.html
@@ -1,4 +1,4 @@
- Lots of programming problems require dealing with data organized as
key/value pairs. Maybe the simplest way of representing such data in
diff --git a/objects.html b/objects.html
index 0797126cc..e91f27b13 100644
--- a/objects.html
+++ b/objects.html
@@ -1,4 +1,4 @@
- This chapter was written by Leo White and Jason Hickey. This chapter includes contributions from Jason Hickey. So far in Part II, we’ve gone through a number of libraries and
techniques you can use to build larger scale OCaml programs. We’ll now
diff --git a/prologue.html b/prologue.html
index 69536ef21..2664a71e3 100644
--- a/prologue.html
+++ b/prologue.html
@@ -1,4 +1,4 @@
- One of OCaml’s best features is its concise and expressive system for
declaring new data types. Records are a key element of that
diff --git a/runtime-memory-layout.html b/runtime-memory-layout.html
index a652be5a2..0feb7e008 100644
--- a/runtime-memory-layout.html
+++ b/runtime-memory-layout.html
@@ -1,4 +1,4 @@
- The FFI interface we described in Chapter 22, Foreign Function Interface hides the precise
details of how values are exchanged across C libraries and the OCaml
diff --git a/testing.html b/testing.html
index 60c723957..47103ff0b 100644
--- a/testing.html
+++ b/testing.html
@@ -1,4 +1,4 @@
- The goal of this chapter is to teach you how to write effective tests
in OCaml, and to show off some tools that can help. Tooling is
diff --git a/toc.html b/toc.html
index b02e6997d..9aec0ad97 100644
--- a/toc.html
+++ b/toc.html
@@ -1,4 +1,4 @@
- Variables and functions are fundamental ideas that show up in
virtually all programming languages. OCaml has a different take on these
diff --git a/variants.html b/variants.html
index 1397a07fc..f9ee2de5b 100644
--- a/variants.html
+++ b/variants.html
@@ -1,4 +1,4 @@
- Variant types are one of the most useful features of OCaml and also
one of the most unusual. They let you represent data that may take on
A Guided Tour
Imperative Programming
Real World OCaml
Functional programming for the masses
2nd Edition (published in Q4 2021)
Real World OCaml
Functional programming for the masses
2nd Edition (published in Q4 2022)
Installation Instructions
+Installation Instructions
Handling JSON Data
Lists and Patterns
Maps and Hash Tables
Objects
Parsing with OCamllex and Menhir
The OCaml Platform
Prologue
Why OCaml?
diff --git a/records.html b/records.html
index 33ad70d72..1a0af0ed9 100644
--- a/records.html
+++ b/records.html
@@ -1,4 +1,4 @@
-Records
Memory Representation of Values
Testing
Part 1: Language Concepts
1. A Guided Tour
2. Variables and Functions
3. Lists and Patterns
List Basics
Using Patterns to Extract Data from a List
Limitations (and Blessings) of Pattern Matching
Using the List Module Effectively
Part 1: Language Concepts
1. A Guided Tour
2. Variables and Functions
3. Lists and Patterns
4. Files, Modules, and Programs
5. Records
6. Variants
7. Error Handling
8. Imperative Programming
9. GADTs
10. Functors
11. First-Class Modules
12. Objects
13. Classes
Part 2: Tools and Techniques
14. Maps and Hash Tables
15. Command-Line Parsing
16. Concurrent Programming with Async
17. Testing
18. Handling JSON Data
19. Parsing with OCamllex and Menhir
20. Data Serialization with S-Expressions
21. The OCaml Platform
Part 3: The Compiler and Runtime System
22. Foreign Function Interface
23. Memory Representation of Values
24. Understanding the Garbage Collector
25. The Compiler Frontend: Parsing and Type Checking
26. The Compiler Backend: Bytecode and Native code
Variables and Functions
Variants