Xavier Leroy, Anil Madhavapeddy, Amir Chaudhry, Thomas Gazagnaire, Jeremy Yallop, David Sheets

Another combined session post. This covered a lot, and it’ll be hard to repeat everything but here it goes. For those that aren’t aware, Xavier Leroy is the primary author of OCaml.

OCaml 4.02.0 was released around this time last year. Since then, it’s seen three point releases, that include more then 120 bugfixes and tens of feature wishes. The latest release, 4.02.3 was released in July 2015, and 4.03.0 is expected to lang in early 2016. That release will include:

There’s a lot to talk about here, but here’s a sampling.

First, inlining records in constructor arguments will be in the next version. So rather than writing down type definitions like this:

type expr = Cont of int and binop of expr_binop
and expr_binop = { op : oper; arg1: expr; arg2: expr }:w

… you can do this instead:

type expr =
  | Constof int
  | Binop of { op : oper; arg1: expr; arg2: expr }

… and deconstruct values like this:

match e with
 | Binop { op; arg1; arg2 } -> ... op .. arg1 ... arg2 
 | Binop { op = Plos } -> ...

The one thing about this feature is that the records can’t be used outside of the parent constructor. It’s really just syntactic sugar for a data type that looks like this:

type expr = Const of int | binop of oper * expr * expr


ppx annotations are going to get some use in the next release of the compiler as well, including support for a @tailcall annotation (produces warning if the call isn’t compiled as a tailcall), a @deprecated annotation, and finally @untagged and @unbox.

And of course, very important to mention that flambda—the new intermediate representation for the compiler—will likely make it into 4.03. Flambda includes around 12 new optimization passes, and results in a 30% perforance improvements on some benchmarks, without changing any user code.

And the final point I’ll cover from Xavier is that of license. OCaml’s always had a strange licensing story that I never totally undertood. Apparently this is how it goes:

Basically, there’s a proposal on the table to throw QPL (what is QPL?) out the window and relicense under the LGPLv2 with static linking exception.

With respect to the OCaml platform, Anil talked about the state of OPAM development, the library of packages, and package contributors. But not before reiterating the goal is to cultivate “a sustainable and productive open-source community across insdustry and academia.”