caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Yaron Minsky <yminsky@gmail.com>
To: Yoann Padioleau <padator@wanadoo.fr>
Cc: Caml Mailing List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Re: Visitor in OCaml
Date: Wed, 21 Jan 2009 23:03:19 -0500	[thread overview]
Message-ID: <891bd3390901212003l732a5833v8eae1da59c6443a@mail.gmail.com> (raw)
In-Reply-To: <87tz7szajk.fsf@aryx.cs.uiuc.edu>

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

On Wed, Jan 21, 2009 at 3:09 PM, Yoann Padioleau <padator@wanadoo.fr> 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

[-- Attachment #2: Type: text/html, Size: 1408 bytes --]

      reply	other threads:[~2009-01-22  4:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-16 15:18 C++/C# inheritance is bad? Kuba Ober
2009-01-16 15:58 ` [Caml-list] " Richard Jones
2009-01-16 16:28   ` On the benefits of OO, Was: " Jan Kybic
2009-01-17 12:40     ` Oliver Bandel
2009-01-16 18:27 ` Raoul Duke
2009-01-16 21:42   ` Kuba Ober
2009-01-17  3:14     ` Sashan Govender
2009-01-17 14:07       ` Kuba Ober
2009-01-18  6:24         ` Stefano Zacchiroli
2009-01-17 13:27 ` Jon Harrop
2009-01-17 14:35   ` Kuba Ober
2009-01-17 16:59     ` Jon Harrop
2009-01-17 21:22       ` Kuba Ober
2009-01-17 22:17         ` Jon Harrop
2009-01-17 23:29           ` David Teller
2009-01-17 23:49             ` Jon Harrop
2009-01-19 16:22       ` Visitor in OCaml [was Re: [Caml-list] C++/C# inheritance is bad?] Yoann Padioleau
2009-01-19 16:41         ` blue storm
2009-01-19 17:49           ` Richard Jones
2009-01-19 17:52           ` Visitor in OCaml Christophe TROESTLER
2009-01-21 20:09           ` Yoann Padioleau
2009-01-22  4:03             ` Yaron Minsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=891bd3390901212003l732a5833v8eae1da59c6443a@mail.gmail.com \
    --to=yminsky@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=padator@wanadoo.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).