What changed in OCaml from 4 to 5
8 releases numbered after 4.14.4 up to and including 5.5.1, stable releases only. 4.14.4 and 5.5.1 are the newest stable releases of 4 and 5 we track; this page follows them as new ones ship.
- 1 mentions breaking changes
- 1 removes or deprecates something
45 changes across 8 releases · 1 landed on more than one version
- Module-dependent functions
- Polymorphic functions as function arguments
- Relocatable compiler
- Generalized local definitions
- Search and replace substring functions
- External types
- Around 60 new functions in the standard library
- Labelled tuples
- Immutable arrays
- Array literal syntax support for immutable arrays and floatarrays through type-directed disambiguation
- Atomic record fields
- Four new standard library modules: Pair, Pqueue, Repr, and Iarray
- More than thirty new standard library functions
- New chapter in the manual on profiling OCaml programs on Linux and macOS
- Syntax for deep effect handlers
- Statistical memory profiling (statmemprof)
- UTF-8 encoded Unicode source files and support for Unicode identifiers
- Around 20 new functions in the standard libraryalso in5.2.0
- Re-introduced GC compaction
- Restored native backend for POWER 64 bits
- Thread sanitizer support
- New Dynarray module
- New -H flag for hidden include directories
- Project-wide occurence metadata support for developer tools
- Raw identifiers
- Local open in type expressions
- Garbage collector improvements
- Restored memory cleanup upon exit mode
- Many runtime and code generation improvements
- Nearly a dozen improved error messages
- More space-efficient implementation of Dynarray
- Improved metadata on pairs of declarations and definitions for merlin
- Improved error messages for first-class modules, functors, labeled arguments, and type clashes
- Many fixes and improvements in the runtime
- Remove Marshal.Compression module, compressed marshaling has been moved to an internal compiler library
- Fix overflow in Marshal
- Fix overflow in bytecode loading
2 releases in the range carry no categorized changes yet: 5.4.15.2.1. Their original notes, where the vendor published any, are below.
Original release notes, newest first
The list above is our reading of these notes; the originals from OCaml are here, one fold per release.
5.5.1OCaml 5.5.1
- Type system bug fix for module-dependent functions
- Security fix: overflow in Marshal
- Security fix: overflow in bytecode loading
- Various runtime fixes
- Restore cloning support on macOS
5.5.0OCaml 5.5.0
Some of the highlights of OCaml 5.5.0 are:
- Module-dependent functions
- Polymorphic functions as function arguments
- Relocatable compiler
- Generalized local definitions
- Search and replace substring functions
- External types
- Garbage collector improvements
- Around 60 new functions in the standard library
5.4.1OCaml 5.4.1
Bug fixes. See detailed list of changes.
5.4.0OCaml 5.4.0
Some of the highlights of OCaml 5.4.0 are:
- Labelled tuples
- Immutable arrays
- Array literal syntax support for immutable arrays and
floatarrays (through type-directed disambiguation) - Atomic record fields
- Four new standard library modules: Pair, Pqueue, Repr, and Iarray
- Restored "memory cleanup upon exit" mode
- New chapter in the manual on profiling OCaml programs on Linux and macOS
And a lot of incremental changes:
- Many runtime and code generation improvements
- More than thirty new standard library functions
- Nearly a dozen improved error messages
- Around fifty bug fixes
5.3.0OCaml 5.3.0
Some of the highlights in OCaml 5.3.0 are:
- Syntax for deep effect handlers
- Restored MSVC port
- Re-introduced statistical memory profiling (statmemprof)
- utf-8 encoded Unicode source files and modest support of Unicode identifiers
- More space-efficient implementation of Dynarray
- Improved metadata on the pairs of declarations and definitions for merlin.
And a lot of incremental changes:
- Around 20 new functions in the standard library
- Many fixes and improvements in the runtime
- Improved error messages for first-class modules, functors, labeled arguments, type clashes.
- Numerous bug fixes
5.2.1OCaml 5.2.1
Bug fixes. See detailed list of changes.
5.2.0OCaml 5.2.0
OCaml 5.2.0 is still a somewhat experimental release compared to the OCaml 4.14 branch. Some of the highlights in OCaml 5.2.0 are:
- Re-introduced GC compaction
- Restored native backend for POWER 64 bits
- Thread sanitizer support
- New Dynarray module
- New -H flag for hidden include directories
- Project-wide occurence metadata support for developer tools
- Raw identifiers
- Local open in type expressions
And a lot of incremental changes:
- Around 20 new functions in the standard library
- Many fixes and improvements in the runtime
- Many bug fixes
5.1.1OCaml 5.1.1
- Breaking change:
Marshal.Compressionhas been removed, compressed marshaling has been moved to an internal compiler library - Bug fixes. See detailed list of changes.