From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=5.0 tests=AWL,DNS_FROM_RFC_POST, HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id F0B62BBAF for ; Thu, 22 Jan 2009 05:03:21 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgkCAMV+d0nRVcbuk2dsb2JhbACCPzGQTD4BAQEBCQkKCREDpH0IfI8jAQMBA4VwgkA X-IronPort-AV: E=Sophos;i="4.37,304,1231110000"; d="scan'208";a="21850983" Received: from rv-out-0506.google.com ([209.85.198.238]) by mail3-smtp-sop.national.inria.fr with ESMTP; 22 Jan 2009 05:03:21 +0100 Received: by rv-out-0506.google.com with SMTP id f6so4412906rvb.3 for ; Wed, 21 Jan 2009 20:03:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=2Psz9laF4Rz4CFV9XNipdKEfRBoi13E4RsjgB7pR5dg=; b=HOQ3XerJFglF4+5KxvdhAm+MeCemr3shQcPSdf0A26UH+YDv315VRTkL+cMwPosu+w H1ef8uGTRb0xImDqKL5Xd65fOH3oqbSaRC55SN0pyt1kP7x0gihxMM0YDm4pE6tNwSDV twM+yZlgt8Qg3+rGIC6a5mixLwXUCeDBVrRe4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=wLrzH3oxprXKkat2ZB7NFmAyR3iS7XKTuylwwD0+IpJM08GJDRHLZ2CD+TRHT33mWv 8n9t8SZy29LNIK27lUsuoSZhkijk7/t4JFG8QT506/CNalgN3eTpW4TVJUNM3ZuGG2Uj cWEnK2gx+lhJJdwSVJxxbZBY7nmpRAa8SVXL8= MIME-Version: 1.0 Received: by 10.115.47.13 with SMTP id z13mr3063358waj.108.1232596999844; Wed, 21 Jan 2009 20:03:19 -0800 (PST) Reply-To: yminsky@gmail.com In-Reply-To: <87tz7szajk.fsf@aryx.cs.uiuc.edu> References: <200901171327.19141.jon@ffconsultancy.com> <200901171659.36732.jon@ffconsultancy.com> <871vuz2rm7.fsf_-_@aryx.cs.uiuc.edu> <527cf6bc0901190841l3247ada1kfc86847aac1445d1@mail.gmail.com> <87tz7szajk.fsf@aryx.cs.uiuc.edu> Date: Wed, 21 Jan 2009 23:03:19 -0500 Message-ID: <891bd3390901212003l732a5833v8eae1da59c6443a@mail.gmail.com> Subject: Re: [Caml-list] Re: Visitor in OCaml From: Yaron Minsky To: Yoann Padioleau Cc: Caml Mailing List Content-Type: multipart/alternative; boundary=0016364182b953b52404610a5a60 X-Spam: no; 0.00; ocaml:01 yaron:01 minsky:01 yminsky:01 camlp:01 camlp:01 2009:98 countless:98 2009:98 countless:98 wrote:01 wrote:01 caml-list:01 functions:01 functions:01 --0016364182b953b52404610a5a60 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Wed, Jan 21, 2009 at 3:09 PM, Yoann Padioleau wrote: > > Moreover, sometimes you need to do things slightly differently > from what is auto-generated and it becomes painful. For instance > it's possible to auto-generate the string_of_xxx for each > type xxx, but at some point you may want to do the printing > slightly differently, hide a few things, do some indentation > work (and use the Format library), etc, and at this point > you will have to write the tedious code. Camlp4 > metaprogramming may save you some time at the beginning, but but do you > really > win that much time in the end ? > Yes! Sexplib is entirely an exercise in camlp4 metaprogramming, and it has saved us countless hours of work and simplified our lives greatly. Yes, if you need lots of variations on your serialization and deserialization functions then camlp4 is a painful way of going about it. But things like sexplib act as general language extensions which can provide broadly useful functionality at a low cost. I really think it's a very big win. y --0016364182b953b52404610a5a60 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Jan 21, 2009 at 3:09 PM, Yoann Padioleau <padator@wanadoo.fr> wrote:<= br>

Moreover, sometimes you need to do things slightly differently
from what is auto-generated and it becomes painful. For instance
it's possible to auto-generate the string_of_xxx for each
type xxx, but at some point you may want to do the printing
slightly differently, hide a few things, do some indentation
work (and use the Format library), etc, and at this point
you will have to write the tedious code. Camlp4
metaprogramming may save you some time at the beginning, but but do you rea= lly
win that much time in the end ?

Yes!

Sexplib is entirely an exercise in camlp4= metaprogramming, and it has saved us countless hours of work and simplifie= d our lives greatly.  Yes, if you need lots of variations on your seri= alization and deserialization functions then camlp4 is a painful way of goi= ng about it.  But things like sexplib act as general language extensio= ns which can provide broadly useful functionality at a low cost.  I re= ally think it's a very big win.

y
 

--0016364182b953b52404610a5a60--