Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Polymorphic pretty printing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-10-25 (01:05)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Polymorphic pretty printing
On Mon, 2004-10-25 at 06:54, Andrej Bauer wrote:
> Christophe TROESTLER wrote:
> > 
> >> Am I supposed to rewrite half of 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,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: