github ocaml/ocaml 4.06.0
OCaml 4.06.0

latest releases: 5.2.0-rc1, 5.2.0-beta2, 5.2.0-beta1...
5 years ago
  • Strings (type string) are now immutable by default. In-place modification must use the type bytes of byte sequences, which is distinct from string. This corresponds to the -safe-string compile-time option, which was introduced in OCaml 4.02 in 2014, and which is now the default.

  • Object types can now extend a previously-defined object type, as in <t; a: int>.

  • Destructive substitution over module signatures can now express more substitutions, such as S with type M.t := type-expr and S with module M.N := path.

  • Users can now define operators that look like array indexing, e.g. let ( .%() ) = List.nth in [0; 1; 2].%(1)

  • New escape \u{XXXX} in string literals, denoting the UTF-8 encoding of the Unicode code point XXXX.

  • Full Unicode support was added to the Windows runtime system. In particular, file names can now contain Unicode characters.

  • An alternate register allocator based on linear scan can be selected with ocamlopt -linscan. It reduces compilation time compared with the default register allocator.

  • The Num library for arbitrary-precision integer and rational arithmetic is no longer part of the core distribution and can be found as a separate OPAM package.

See also: detailed list of changes.

Don't miss a new ocaml release

NewReleases is sending notifications on new releases.