From: Martin Jambon <martin.jambon@ens-lyon.org>
To: blue storm <bluestorm.dylc@gmail.com>
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:19:57 +0200 [thread overview]
Message-ID: <4ABB63ED.1000402@ens-lyon.org> (raw)
In-Reply-To: <527cf6bc0909240502p1292ca1fs5890d3efeac49531@mail.gmail.com>
blue storm wrote:
> 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).
Of course, the internals of json-static are much more likely to change than
its user interface. This may however not be such a big problem here in practice.
The problem is more that it's not compatible with other possible extensions of
json-static provided by 3rd parties.
> 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.
Oh yes, there's type-conv too. I don't know the pros and cons of using either
type-conv or deriving. If anyone knows, a brief comparison would be helpful.
Martin
--
http://mjambon.com/
next prev parent reply other threads:[~2009-09-24 12:27 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
2009-09-24 12:19 ` Martin Jambon [this message]
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=4ABB63ED.1000402@ens-lyon.org \
--to=martin.jambon@ens-lyon.org \
--cc=bluestorm.dylc@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=dra-news@metastack.com \
--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