Thoughts about OCaml after using it for two days for Advent of Code (repo):

  • I can see why people like this language. HM type inference is very nice, I barely had to write any types and the programs are all typechecked. Puts TypeScript to shame.
  • The build system (dune?) feels a little weird, it’s strange to configure things in S-expressions. The REPL (utop) is also pretty clunky, especially with how expressions require the ;; terminator. I keep forgetting about this, though it’s not a big deal to add it in the next line.
  • Very strange to not have some kind of trivial “inspect”/“console.log” function, having to do printf debugging in 2025 is quite unpleasant.
  • A lot of quite basic things that I’m already quite used to from other languages aren’t here - basic ranges aren’t in the stdlib, no pointfree function composition. This is the kind of thing that is pretty useful for AoC, but maybe not that much in real life.
  • For such simple code there were quite a few LLM hallucinations already, so not that good for AI-supported development it seems.