* There's no ownership tracking. This might be obvious - it doesn't need it, it has GC - but is actually kind of unfortunate; even in GC'd languages, linearity can be used to safely model state machines/typestate or for optimization.
* There's no traits/ad-hoc polymorphism at all.
* There's no impls, though a common pattern with a similar feel is to define types inside modules with the actual implementation of the type hidden, and provide an interface via functions to create or interact with instances of the type.
* It uses exceptions for error handling (when it doesn't use an option type) and even as a lightweight control flow mechanism. And now there's algebraic effects as well.
* It has an extraordinarily powerful module system, with functors (pass modules into other modules to produce new modules) and first-class modules (modules that exist as values at run-time that can be passed around to functions).
* It has some more advanced type machinery - GADTs, polymorphic variants, and a very interesting, powerful, almost completely unused object system.
* This bleeds a little into "ecosystem" and a little into "no ad-hoc polymorphism" and a little into the oddness of the syntax and a little into subjectivity, but in general doing really bog-standard imperative stuff in OCaml, while possible, tends to feel more awkward than it does in Rust.
* Compiler errors won’t help you much
* The tooling is lacking compared to cargo. It’s pretty much makefiles in a lisp language (better love parens)
* The ordering of your code matters, shadowing functions and structs is a a thing
* use A::* is pretty much the default, and transitive dependencies are imported at the top level, so be ready to be confused about the origin of a function or module or variable
I really wish more people would write OCaml so that we’d have a better ecosystem.
If you’re looking to get into a new language, you should seriously consider it as there are SO MANY low hanging fruits and opportunities to have an impact on the language.
Sbt is actually worse than dune+opam .
Ocaml has type inference globally so you are not required to spray type annotations at everything.
But Scala does have type directed lookup (type classes/ implicits).
Both have the curse of implementation/typing choices that stops you from doing the actual job ;)
I actually don’t use it myself but it seems to bring the modern programming language experience to OCaml
I think over time Jane Street will (continue to) open source more of its libraries, and hopefully soon will also migrate onto Dune (internally they use jenga[0]). This should mean that the ecosystem within Jane Street more closely matches the external environment and tooling should get better as they push patches upstream.
Hopefully.
[0] https://discuss.ocaml.org/t/does-jenga-have-more-features-th...