newsfilter
← Interviews
Jane Street8 min

OCaml's New Proposed "include functor" Syntax | OCaml Unboxed

Goldfirere

Tutorial

Jane Street is developing an "include functor" feature for the OCaml compiler that allows modules to directly include functor results based on their own preceding definitions. This innovation eliminates the need for cumbersome intermediate wrapper modules and manual reordering, streamlining the implementation of repetitive patterns like reverse array iteration. A working compiler version supporting this syntax is currently available for testing, with plans to upstream the feature to the mainstream OCaml distribution.