What are the biggest reasons newcomers give up on OCaml?

It’s even better, it has deriving built-in (something I’ve been wanting in OCaml since… years), thus allowing the compiler to just derive the Debug trait, which includes printers (while not doing anything in release builds I assume, so without sacrificing the generated code size). So while the initial experience of not being able to print a random value with {} is reminiscent of OCaml, using {:?} and deriving Debug was pretty straightforward. Contrast this to %a and either having to depend on ppx_deriving_show or composing a debug printer using Fmt.Dump.*, in practice this is much more ergonomic on the Rust side because it just works (also due to the compiler telling you to derive Debug in the error message).

I’m not likely to switch to Rust soon but revisiting Rust 1.65 after my last foray into it at version 0.9 it was full of genuinely nice ideas that made onboarding on a rather complex language quite pleasant.

9 Likes