Twitter/X

Xavier Leroy (creator of OCaml) contrasts OCaml with Rust and JavaScript, arguing…

Brief

Xavier Leroy, creator of OCaml, gives an approachable interview covering OCaml’s distinguishing features, type inference mechanics, and formal verification, while explaining multicore and interop difficulties. He highlights trade-offs versus Rust and JavaScript, cautions about 'almost-correct' LLM code, and forecasts how LLMs will reshape languages; episode available across YouTube, Spotify, Apple Podcasts and a transcript.

Why it matters

Xavier Leroy (creator of OCaml) contrasts OCaml with Rust and JavaScript, arguing OCaml’s functional design and type inference produce different trade-offs versus Rust’s manual-memory performance and JavaScript’s dynamism (chapters 00:43, 04:39, 07:57, 11:21).

Key details

  • He explains how type inference and formal verification work and why OCaml’s multicore support and cross-language calling are technically challenging (type inference 16:05; formal verification 22:12; multicore 40:07; interop 50:17).
  • Leroy warns that 'almost-correct' LLM-generated code is dangerous and outlines how LLMs will change programming languages and tooling (warning 57:41; LLMs & languages 01:05:39); the full interview is on YouTube, Spotify, Apple Podcasts, with a transcript available.
Source evidence

Xavier Leroy (creator of OCaml) is an expert in compilers, formal verification of software and functional programming.

This interview should be an approachable resource if you're curious about formal verification of software since I was learning that on the fly during it.

In this episode:

• OCaml compared with Rust and JavaScript
• What is formal verification and how does it work
• How languages call each other across boundaries
• How to address "almost-correct" LLM code
• How type inference works in programming languages

Where to watch:

• YouTube - piped.video/9Cswiqrq6So
• Spotify - open.spotify.com/episode/7cd…
• Apple Podcasts - podcasts.apple.com/us/podcas…
• Transcript - developing.dev/p/creator-of-…

Thank you to the sponsor of this episode for supporting my work:

• WorkOS: makes your app Enterprise Ready with easy to use APIs to add SSO, SCIM, RBAC, and more in just a few lines of code, check them out at workos.com/

Chapters:

00:00 - Intro
00:43 - What sets OCaml apart
04:39 - OCaml vs Rust
07:57 - Why is manual memory management more performant
11:21 - Javascript vs OCaml
14:00 - Famous Rob Pike quote
16:05 - Type inference and how it works
22:12 - What is formal verification and how does it work
40:07 - What made multicore support difficult for OCaml
50:17 - How programming languages interface and call each other
57:41 - The danger of almost-correct LLM code
01:05:39 - How LLMs will change programming languages
01:10:26 - Industry vs academia
01:15:05 - Most interesting unsolved problems
01:18:30 - Top book recommendations for engineers
01:21:17 - Advice for his younger self
01:23:31 - Outro

Video