2.8. Summary#
Syntax and semantics are a powerful paradigm for learning a programming language. As we learn the features of OCaml, we’re being careful to write down their syntax and semantics. We’ve seen that there can be multiple syntaxes for expressing the same semantic idea, that is, the same computation.
The semantics of function application is the very heart of OCaml and of functional programming, and it’s something we will come back to several times throughout the course to deepen our understanding.
2.8.1. Terms and Concepts#
anonymous functions
assertions
binding
binding expression
body expression
debugging
defensive programming
definitions
documentation
dynamic semantics
evaluation
expressions
function application
function definitions
identifiers
idioms
if expressions
lambda expressions
let definition
let expression
libraries
metavariables
mutual recursion
pipeline operator
postcondition
precondition
printing
recursion
semantics
static semantics
substitution
syntax
tools
type checking
type inference
values
2.8.2. Further Reading#
Introduction to Objective Caml, chapter 3
OCaml from the Very Beginning, chapter 2
Real World OCaml, chapter 2
Tail Recursion, The Musical. Tail-call optimization explained in the context of JavaScript with cute 8-bit animations, and Disney songs!