Skip to content

Course

OCaml & ReasonML Basics

A practitioner's introduction to ML-family programming: inference, exhaustive pattern matching, modules, tooling, and the production reasons compiler teams and trading firms keep choosing OCaml.

9 lessons

Course Q&A

Reviews

Enrolled members can rate this course.

No reviews yet.

Types as Executable Design

Learn why ML languages encode domain rules in types, how inference really works, and how pattern matching turns missing cases into compile-time failures.

  1. 01Why ML Won Compilers and Trading FloorsUnderstand the historical and practical reasons OCaml remains attractive for compilers, analyzers, trading systems, and correctness-critical infrastructure.22mOpen
  2. 02Type Inference and Local ReasoningRead inferred types accurately, recognize unification failures, and decide where annotations are documentation rather than noise.24mOpen
  3. 03Algebraic Data Types and Exhaustive Pattern MatchingModel domains with variants and records, then use exhaustive matching, guards, and compiler warnings to expose missing cases early.27mOpen

Modules and Program Architecture

Use structures, signatures, functors, errors, and effects to build large OCaml systems without losing local reasoning.

  1. 01Modules, Signatures, and EncapsulationUse structures and signatures as the unit of architecture: hide representations, expose operations, and make dependencies explicit.25mOpen
  2. 02Functors and Sharing Constraints Without FearTreat functors as compile-time dependency injection, understand when they help, and avoid turning simple architecture into type-level bureaucracy.26mOpen
  3. 03Errors, IO, and Effects in Real ProgramsChoose between exceptions, result values, and effect handlers deliberately while keeping IO boundaries explicit and testable.25mOpen

Production OCaml and ReasonML

Work with opam and Dune, understand ReasonML and ReScript's JavaScript path, and evaluate performance, FFI, and deployment tradeoffs.

  1. 01opam, Dune, and Native Builds That Stay ReproducibleSet up OCaml tooling correctly, read Dune files, pin dependencies, and understand what the native compiler is actually producing.23mOpen
  2. 02ReasonML, ReScript, and the JavaScript SplitUnderstand what ReasonML was, how ReScript diverged, and what interoperability realistically means for teams targeting JavaScript today.21mOpen
  3. 03Performance, FFI, and When OCaml Fits ProductionMeasure allocation and latency honestly, cross the C boundary carefully, and decide where ML's correctness-performance balance beats mainstream alternatives.28mOpen