From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA05220; Mon, 25 Oct 2004 09:26:15 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 JAA05875 for ; Mon, 25 Oct 2004 09:26:14 +0200 (MET DST) Received: from haka.fmf.uni-lj.si (haka.fmf.uni-lj.si [193.2.67.18]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i9P7QEAc017860 for ; Mon, 25 Oct 2004 09:26:14 +0200 Received: from localhost ([127.0.0.1] ident=andrej) by haka.fmf.uni-lj.si with esmtp (Exim 3.36 #1 (Debian)) id 1CLzF7-000272-00 for ; Mon, 25 Oct 2004 09:26:13 +0200 Message-ID: <417CAA95.20400@andrej.com> Date: Mon, 25 Oct 2004 09:26:13 +0200 From: Andrej Bauer User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040830) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "O'Caml Mailing List" Subject: Re: [Caml-list] Polymorphic pretty printing References: <4173E464.7030500@andrej.com> <20041023.000711.91476428.debian00@tiscali.be> <417C1673.6020007@andrej.com> <1098666276.3075.65.camel@pelican.wigram> <20041025030217.GB1582@old.davidb.org> In-Reply-To: <20041025030217.GB1582@old.davidb.org> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 417CAA96.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; andrej:01 bauer:01 andrej:01 bauer:01 caml-list:01 2004:99 printf:01 sprintf:01 %02:01 %02:01 verbose:01 clumsy:01 printf:01 ocaml:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk David Brown wrote: > On Mon, Oct 25, 2004 at 11:04:36AM +1000, skaller wrote: > >> I'm curious why people want to use these kinds of routines. >> What does printf style mini-language printing have to offer compared to >> just using plain old Ocaml functions? > > sprintf "%04d/%02d/%02d %02d:%02d:%02d" y m d h m s > > becomes rather verbose and clumsy when written out as functions. This discussion has nothing to do with printf and similar function. Please do not derail the thread and stay on topic, which is pretty-printing in ocaml toplevel. Assuming the original question was "why pretty-printing" (as opposed to "why printf", which is irrelevant to this discussion), the answer I hope is clear: because a good interactive toplevel is useful for many purposes. I have two kinds of motivation: teaching ocaml and enriching ocaml toplevel with graphics and the like, so that it looks and feels more like Mathematica. (Looks are important!) Best regards, Andrej ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners