English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Format syntax extension
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-02-01 (13:22)
From: Tiphaine Turpin <Tiphaine.Turpin@i...>
Subject: Format syntax extension
Dear list,

I'm pleased to announce the first release of the Format syntax extension
for Ocaml:

Format is basically a quotation-style printf, i.e., it defines
quotations for building strings and writing to buffers, channels, and
formatters, with data being inserted through antiquotations rather than
subsequent arguments. Here is a list of features:

- Format can be used to write to strings, buffers, channels, and (with a
limited efficiency) formatters.
- Format expressions are (mostly) compiled rather than interpreted (less
- All Printf formatting instructions are supported, except %a (but %t
seems more natural in this setting anyway).
- Conditionals and iteration are available.
- Type errors are more readable than with printf.
- Errors should be correctly located (both in formats and inside
- Also works with Ocaml Batteries  with out_channel -> 'a IO.output (no
integration with the "prefixes" of batteries).

Tiphaine Turpin