From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 343F1BC88 for ; Sun, 6 Feb 2005 12:30:46 +0100 (CET) Received: from spoolo1.tiscali.be (spoolo1.tiscali.be [62.235.13.172]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j16BUjLR012980 for ; Sun, 6 Feb 2005 12:30:46 +0100 Received: from [62.235.155.133] (helo=poincare) by spoolo1.tiscali.be with esmtp (Tiscali.be http://www.tiscali.be) id 1Cxkcm-0008HO-W6; Sun, 06 Feb 2005 12:30:45 +0100 Received: from poincare ([127.0.0.1] helo=localhost ident=trch) by poincare with esmtp (Exim 3.36 #1 (Debian)) id 1CxkQu-00027d-00; Sun, 06 Feb 2005 12:18:28 +0100 Date: Sun, 06 Feb 2005 12:18:27 +0100 (CET) Message-Id: <20050206.121827.26295505.Christophe.Troestler@umh.ac.be> To: remi.vanicat@gmail.com Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] The boon of static type checking From: Christophe TROESTLER In-Reply-To: <6b8a914205020502004630da78@mail.gmail.com> References: <20050204.232742.18510019.Christophe.Troestler@umh.ac.be> <6b8a914205020502004630da78@mail.gmail.com> Organization: Universite de Mons-Hainaut (http://math.umh.ac.be/an/) X-Spook: fraud Ft. Knox Janet Reno Albright FBI BCCI top secret S Key Capricorn White Water X-Blessing: Om Ah Hum Vajra Guru Pema Siddhi Hum X-Operating-System: GNU/Linux (http://www.linux.org/) X-Mailer-URL: http://www.mew.org/ X-Mailer: Mew version 4.2rc1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4205FFE5.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 christophe:01 troestler:01 christophe:01 troestler:01 umh:01 wrote:01 umh:01 wrote:01 hash:01 vectors:01 vectors:01 ioxml:01 parser:01 ioxml:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Sat, 5 Feb 2005, Remi Vanicat wrote: > > On Fri, 04 Feb 2005 23:27:42 +0100 (CET), Christophe TROESTLER > wrote: > > On Fri, 4 Feb 2005, Thomas Fischbacher 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 while others may want a textual representation. ChriS