Why we chose OCaml to write Stategraph
stategraph.dev·9h·
Flag this post

OCaml Type Systems Functional Programming Infrastructure Stategraph

Josh Pollara • November 6th, 2025

TL;DR

$ cat why-ocaml.tldr

• Stategraph manages Terraform state, so correctness isn’t optional

• Strongly-typed data structures catch field errors at compile time

• Type-safe SQL queries prevent schema drift before deployment

• Immutability by default eliminates race conditions

• PPX generates correct JSON serialization automatically

We’re building infrastructure that manages other people’s infrastructure. State corruption can’t be “rare.” It has to be impossible. That’s why we chose OCaml.

OCaml logo OCaml logo

Stategraph stores Terra…

Similar Posts

Loading similar posts...