English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Estimating the size of the ocaml community
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-02-06 (11:30)
From: Christophe TROESTLER <Christophe.Troestler@u...>
Subject: Re: [Caml-list] The boon of static type checking
On Sat, 5 Feb 2005, Remi Vanicat <remi.vanicat@gmail.com> wrote:
> On Fri, 04 Feb 2005 23:27:42 +0100 (CET), Christophe TROESTLER
> <Christophe.Troestler@umh.ac.be> wrote:
> > On Fri, 4 Feb 2005, Thomas Fischbacher <Thomas.Fischbacher@Physik.Uni-Muenchen.DE> wrote:
> > >
> > > When I do algorithmically involved stuff, I frequently pretty soon
> > > reach the stage where I pass around structures of hash tables of
> > > structures and vectors of structures of vectors of numbers, say. I
> > > personally did experience it as painful to have to write specialized
> > > print functions for stuff like that. [...]
> > 
> > To Camlp4 knowledgeable people : is Camlp4 able to automatically
> > generate such printers ?
> > 
> Yes. In fact there is IoXML for xml parser and printer that can be found at
> http://pauillac.inria.fr/~ddr/IoXML/
> one could change it for non XML custom printer easily (I belive)

My concern is with the types: if you want to "print x", you somehow
need to know the type of "x"... which is not available to camlp4.
However, I was thinking that maybe using the .annot file, camlp4 could
generate a good-enough printer (functions, abstract types, objects
being still opaque of course).  Such a system should be configurable
because I suppose some people would be happy with, say hashes, to be
<abstr> while others may want a textual representation.