Sunday, 5 April 2009

OCaml batteries included

The batteries included project is one of the most exciting developments in the OCaml world today and promises to provide a comprehensive suite of well-documented libraries and language extensions that will be bundled with any compliant OCaml distribution.

The project is apparently nearing its first major release and has even found its way into current Debian-based distros.

The language extensions are one of the most interesting aspects of this project because they augment OCaml with first-class support for a variety of new features. David Rajchenbach-Teller was kind enough to list some of the features related specifically to strings on the caml-list:

Regular OCaml strings.

Strings with capabilities (i.e. strings which, depending on their type, can be read-only/write-only/read-write) -- sometimes faster than regular strings, never slower.

Immutable Unicode ropes.

Given OCaml's recent uptake as a scripting language for concurrent programming, string handling is of growing importance and these language extensions will be a welcome addition!