Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Markus Mottl <markus.mottl@gmail.com>
To: "Matej Košík" <5764c029b688c1c0d24a2e97cd764f@gmail.com>
Cc: Yaron Minsky <yminsky@janestreet.com>, Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] concerning using of `deriving' syntactic plugin
Date: Wed, 7 Mar 2012 12:10:27 -0500	[thread overview]
Message-ID: <CAP_800pcG+wC9iXMAvY3-4zjO-HdoX+c_Humz3guSrqeG6znTw@mail.gmail.com> (raw)
In-Reply-To: <4F579054.60203@gmail.com>

On Wed, Mar 7, 2012 at 11:44, Matej Košík
<5764c029b688c1c0d24a2e97cd764f@gmail.com> wrote:
> I have found one (I guess unnecessary) disadvantage over `deriving'.
> If you process your *.ml file with sexplib/bin_prot preprocessor, you
> have to append "with ..." suffix to every type definition, otherwise you
> will get a an error report from the preprocessor. `Deriving' does not
> force you to do that. You can annotate only those type definitions,
> which for you makes sense to annotate.

I'm not sure what the perceived problem is, but there should be no
need to annotate all type definitions.  It should suffice to annotate
those for which converters are needed.  This, of course, means that
any types that a type definition is referring to will also need
annotations (or hand-written conversion functions).

Regards,
Markus

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com


  reply	other threads:[~2012-03-07 17:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 11:49 Matej Košík
2012-03-07 12:31 ` Gabriel Scherer
2012-03-07 16:44   ` Matej Košík
2012-03-07 17:06     ` Jérémie Dimino
2012-03-07 12:34 ` Yaron Minsky
2012-03-07 16:44   ` Matej Košík
2012-03-07 17:10     ` Markus Mottl [this message]
2012-03-07 17:28       ` Matej Košík
2012-03-07 20:47         ` Till Varoquaux
2012-03-08  2:49         ` Markus Mottl

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=CAP_800pcG+wC9iXMAvY3-4zjO-HdoX+c_Humz3guSrqeG6znTw@mail.gmail.com \
    --to=markus.mottl@gmail.com \
    --cc=5764c029b688c1c0d24a2e97cd764f@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=yminsky@janestreet.com \
    /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