From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id B7732BBAF for ; Mon, 1 Feb 2010 14:22:35 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.49,383,1262559600"; d="scan'208";a="55071820" Received: from arvin.irisa.fr (HELO [131.254.11.86]) ([131.254.11.86]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 01 Feb 2010 14:22:33 +0100 Message-ID: <4B66D4CA.7000301@irisa.fr> Date: Mon, 01 Feb 2010 14:19:06 +0100 From: Tiphaine Turpin User-Agent: Thunderbird 2.0.0.19 (X11/20090216) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Format syntax extension Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; irisa:01 syntax:01 syntax:01 ocaml:01 printf:01 printf:01 conditionals:01 iteration:01 ocaml:01 frs:98 readable:01 defines:01 tar:01 strings:01 strings:01 Dear list, I'm pleased to announce the first release of the Format syntax extension for Ocaml: https://forge.ocamlcore.org/frs/download.php/360/format-1.0.tar.bz2. 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 overhead). - 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 anti-quotations). - Also works with Ocaml Batteries with out_channel -> 'a IO.output (no integration with the "prefixes" of batteries). Tiphaine Turpin