4.06.0
版本发布时间: 2018-06-12 18:28:45
ocaml/ocaml最新发布版本:5.2.0(2024-05-13 20:27:08)
-
Strings (type
string
) are now immutable by default. In-place modification must use the typebytes
of byte sequences, which is distinct fromstring
. 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
andS 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 pointXXXX
. -
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.