From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA03696 for caml-redistribution; Thu, 25 Mar 1999 19:42:32 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA11769 for ; Thu, 25 Mar 1999 14:29:05 +0100 (MET) Received: from infbssys.ips.cs.tu-bs.de (infbssys.ips.cs.tu-bs.de [134.169.32.1]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id OAA14320 for ; Thu, 25 Mar 1999 14:29:04 +0100 (MET) Received: from infbsstq.ips.cs.tu-bs.de (lindig@infbsstq.ips.cs.tu-bs.de [134.169.32.78]) by infbssys.ips.cs.tu-bs.de (8.9.1/8.9.1) with ESMTP id OAA09939; Thu, 25 Mar 1999 14:29:02 +0100 Date: Thu, 25 Mar 1999 14:29:01 +0100 From: Christian Lindig To: John Prevost Cc: caml-list@inria.fr Subject: Re: another approach to sprintf (Re: ocaml 2.02 bug: curried printf) Message-ID: <19990325142901.B3236@ips.cs.tu-bs.de> Mail-Followup-To: John Prevost , caml-list@inria.fr References: <19990312160017.60444@pauillac.inria.fr> <19990319174720-10695P.sumii@harp.is.s.u-tokyo.ac.jp> <19990323171753.17334@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: ; from John Prevost on Wed, Mar 24, 1999 at 02:37:53PM -0500 Sender: weis +-- Xavier Leroy | It's a cute trick. One drawback is that the format is not a | character string, but needs to be expressed using special | functions and infix operators. +-- John Prevost | It does, however, mean that people can extend the set of patterns | that can be used in printf in a more palatable way than the | %a mechanism. Especially with neat things like Danvy's "lis" | combinator. The suggested functional approach to printf has another possible drawback: when you want to express all the options like "%5.5f" possible in C style printf formatting you need a whole bunch of functions. Since OCaml has no overloading a single `float' function for floats can not capture them all. -- Christian -- Christian Lindig Technische Universitaet Braunschweig, Germany http://www.cs.tu-bs.de/softech/people/lindig lindig@ips.cs.tu-bs.de