caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: blue storm <bluestorm.dylc@gmail.com>
To: Martin Jambon <martin.jambon@ens-lyon.org>
Cc: Mykola Stryebkov <nick@mykola.org>,
	David Allsopp <dra-news@metastack.com>,
	caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Generation of Java code from OCaml
Date: Thu, 24 Sep 2009 14:02:14 +0200	[thread overview]
Message-ID: <527cf6bc0909240502p1292ca1fs5890d3efeac49531@mail.gmail.com> (raw)
In-Reply-To: <4ABB5597.9010805@ens-lyon.org>

On Thu, Sep 24, 2009 at 1:18 PM, Martin Jambon
<martin.jambon@ens-lyon.org> wrote:
> Yes, patching the original code of json-static would work but it's not ideal.

>From the example given, it seems that the original poster already uses
json-static. In that case, I think that reusing the code logic is a
good idea (coherent behaviour, etc.). I suppose that you dislike the
"patching" solution as it is not easily reusable (one cannot use the
upstream json-static anymore).

What about factorising json-static to allow adding arbitrary code
generators (represented as functions from (string * type_def) list to
a camlp4 Ast) at camlp4-time ? You would have a design similar to
type-conv, wich allows adding new generators without modifying
type-conv itself.


  reply	other threads:[~2009-09-24 12:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23 18:15 Mykola Stryebkov
2009-09-23 19:57 ` [Caml-list] " Richard Jones
2009-09-23 22:54   ` Mykola Stryebkov
2009-09-24  8:03     ` David Allsopp
2009-09-24  9:45       ` blue storm
2009-09-24 11:18         ` Martin Jambon
2009-09-24 12:02           ` blue storm [this message]
2009-09-24 12:19             ` Martin Jambon
2009-10-03 12:16               ` Anil Madhavapeddy
2009-10-03 17:27                 ` blue storm
2009-10-03 18:29                   ` Anil Madhavapeddy
2009-09-26  7:37             ` ygrek

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=527cf6bc0909240502p1292ca1fs5890d3efeac49531@mail.gmail.com \
    --to=bluestorm.dylc@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=dra-news@metastack.com \
    --cc=martin.jambon@ens-lyon.org \
    --cc=nick@mykola.org \
    /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).