Advantages of OCaml over Rust

I’m kind of surprised no one mentioned type inference yet.

OCaml will infer the most general types for almost everything (except for objects with polymorphic methods and functor arguments) whereas Rust requires much more type annotations. The extra boilerplate makes Rust more verbose and less flexible if you end up wanting to change types around.

5 Likes