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 DAA23933; Mon, 25 Oct 2004 03:05:11 +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 DAA23066 for ; Mon, 25 Oct 2004 03:05:09 +0200 (MET DST) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i9P157bC009330 for ; Mon, 25 Oct 2004 03:05:08 +0200 Received: from [192.168.1.200] (ppp217-99.lns1.syd3.internode.on.net [203.122.217.99]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i9P14b4Y072195; Mon, 25 Oct 2004 10:34:53 +0930 (CST) Subject: Re: [Caml-list] Polymorphic pretty printing From: skaller Reply-To: skaller@users.sourceforge.net To: Andrej Bauer Cc: Christophe TROESTLER , "O'Caml Mailing List" In-Reply-To: <417C1673.6020007@andrej.com> References: <4173E464.7030500@andrej.com> <20041023.000711.91476428.debian00@tiscali.be> <417C1673.6020007@andrej.com> Content-Type: text/plain Message-Id: <1098666276.3075.65.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 25 Oct 2004 11:04:36 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 417C5143.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 sourceforge:01 2004:99 andrej:01 bauer:01 troestler:01 printf:01 printf:01 debugging:01 ocamlopt:01 9660:01 glebe:01 christophe:01 ocaml:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, 2004-10-25 at 06:54, Andrej Bauer wrote: > Christophe TROESTLER wrote: > > > >> Am I supposed to rewrite half of toplevel.ml to get this working? > > > > I am afraid that the awser is yes :(. Let's see why: > > Thanks for the hints. > > I'd be willing to take a shot at writing a more flexible toplevel, one > that allows to install polymorphic pretty-printers in a sane way. 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? I almost never use this kind of printer, and even systematically removed it from a program I was working on once. I would have guessed printf style printing is nice for debugging or perhaps logs, but not much more. Ocaml itself seems a stronger and better language to me. Similarly I never use iostreams in C++ .. and there we have overloading, which is even more convenient for remembering the names of the formatting routines. Still, I use printf() itself in C. What makes such printers better than just using ordinary routines? > Does this sound like a sound plan? Or am I missing something? Well, how would you port code using such a printer to an ocamlopt program? -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- 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