Hi! Coming back to OCaml after 7+ years, today I decided to look at the open PRs to see where the language is headed. Maybe someone finds it useful. I’m mostly omitting Stdlib changes. These stood out to me:
-
Bidirectional type checking: more type propagation during inference, improves autocompletion (e.g. for OO code).
-
Monadic syntax for
match
. Also: Jane Street not using binding operators, but the old PPX ← is it still true? Thelet
syntaxes are not fully made use of. -
Unwind-protect mechanism
Fun.with_resource
→ in draft. -
Built-in syntax Promote constructors to functions → contested use of curried functions.
-
Unique types to make more abstract types work well with GADTs
-
Modular explicits, modular implicits without the implicit application part. This has the power of first-class functors, but with much more concise syntax, avoids explicit signatures, and allows local type annotations like
let f {module M : S} (x : M.t) = x
-
MetaOCaml: reserve
>.
, syntax for.<e>.
,.~e
, pprintast, support for.<e>.
,.~e
. -
“Subtyping syntax” for modules enables things like
include (M :> S)
. -
let.op x =
bindings parameterized by theop
, complementing the currentlet+ x =
andlet* x =
binding syntaxes. -
OCaml memory model documentation.
-
Turn keywords to identifiers (mainly for backward compatibility).
-
Built-in syntax Promote fields to functions.
-
Fast native toplevel using JIT (JIT in the sense: embedded assembler to replace invoking an assember process; not JIT in the sense of runtime code optimization).
Edited: I don’t mention but appreciate the most valuable work on bug fixes, robustness features, and code quality improvements! But, I’m excited about MetaOCaml and modular implicits, hoping they make it into the language.
Edited 2: I added (17) and (18) above.