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 SAA15747 for caml-redistribution; Fri, 12 Mar 1999 18:13:31 +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 RAA05058 for ; Fri, 12 Mar 1999 17:19:24 +0100 (MET) Received: from smtp1.xs4all.nl (smtp1.xs4all.nl [194.109.6.51]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id RAA00896 for ; Fri, 12 Mar 1999 17:19:22 +0100 (MET) Received: from toy.william.bogus (dc2-modem1281.dial.xs4all.nl [194.109.133.1]) by smtp1.xs4all.nl (8.8.8/8.8.8) with ESMTP id RAA29885 for ; Fri, 12 Mar 1999 17:19:21 +0100 (CET) Received: (from williamc@localhost) by toy.william.bogus (8.8.7/8.8.7) id PAA03531; Fri, 12 Mar 1999 15:31:55 GMT Date: Fri, 12 Mar 1999 15:31:55 GMT Message-Id: <199903121531.PAA03531@toy.william.bogus> From: William Chesters MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: caml-list@inria.fr Subject: Re: ocaml 2.02 bug: curried printf In-Reply-To: <19990312160017.60444@pauillac.inria.fr> References: <199903060138.BAA13133@toy.william.bogus> <19990312160017.60444@pauillac.inria.fr> X-Mailer: VM 6.34 under Emacs 20.2.1 Sender: weis Xavier Leroy writes: > The behavior of the *printf functions when partially applied > has always been a bit strange even before 2.02: [...] Ooooh yes, I never noticed that ... > The alternative is to keep a buffer-based sprintf that is efficient > and consistent with printf ("consistent" in the sense of "as weird as"), > but is not really usable in partial application contexts. > > Any opinions? The change in behaviour was a nuisance to me (and I now have a module called Printf201!). In spite of that I'd be happy to stick with the new semantics if it's more efficient. I say that becase I believe the reason I used constructs like concat " " (Array.map (sprintf "...") xs) , for generating C code and string representations of complex objects, was precisely because of the lack of extensible string buffers. With Buffer available I would be more likely to use a `for' loop with `bprintf' (or indeed `Format.bprintf').