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 PAA15968 for caml-redistribution; Wed, 24 Mar 1999 15:17:30 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA25107 for ; Tue, 23 Mar 1999 17:17:58 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id RAA02716; Tue, 23 Mar 1999 17:17:53 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA20920; Tue, 23 Mar 1999 17:17:53 +0100 (MET) Message-ID: <19990323171753.17334@pauillac.inria.fr> Date: Tue, 23 Mar 1999 17:17:53 +0100 From: Xavier Leroy To: Eijiro Sumii , caml-list@inria.fr Subject: Re: another approach to sprintf (Re: ocaml 2.02 bug: curried printf) References: <19990312160017.60444@pauillac.inria.fr> <19990319174720-10695P.sumii@harp.is.s.u-tokyo.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1 In-Reply-To: <19990319174720-10695P.sumii@harp.is.s.u-tokyo.ac.jp>; from Eijiro Sumii on Fri, Mar 19, 1999 at 05:47:20PM +0900 Sender: weis > I don't know very much about *printf in ocaml, but how about Olivier > Danvy's approach to sprintf (http://www.brics.dk/RS/98/12/index.html)? > It seems safer and faster than ordinary "interpretive" approach. I'd > like to hear what do you (I mean, readers of this mailing list) think > about it. 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. On the other hand, it doesn't need the special typechecking rules for format strings that we have in OCaml. With this special typechecking rules, I don't think Danvy's "partially evaluated" printf is any safer than OCaml's "interpreted" printf. Also, it doesn't solve (nor makes any worse) the issues with partial application of printf and friends that we discussed before. - Xavier Leroy