[wg-camlp4] Runtime types and no -pp(x)
Hongbo Zhang
hongboz at seas.upenn.edu
Tue Feb 5 15:39:30 GMT 2013
Hi Sebastien,
I agree with you that adding run-time types. To clarify a bit, Fan is
not invasive as Camlp* or ppx(the current ppx proposal seems to be quite
large change to the compiler), it does not need any change to the compiler,
so it does not impose you to use it.
For the deriving and type_conv syntax extension conflict, this is not the
Fault of Camlp*, you can avoid
it while still using Camlp*, the solution is adopted by Fan
{:ocaml|
type u = A of int
|}
{:derive| whatever you like|}
On Tue, Feb 5, 2013 at 10:29 AM, Sebastien Mondet <
sebastien.mondet at gmail.com> wrote:
>
> Hi
>
> Yet Another Proposal ™ :)
>
> Here, at NYU-Bio we use camlp4 in two ways:
>
> 1. All the code is JaneSt-Core-styled and uses sexplib.syntax and
> bin_prot.syntax
>
> We also use an ('a, 'b) Result.t Lwt.t monad everywhere but there is no
> need for camlp4, monadic programming is perfectly fine with normal OCaml
> syntax.
>
> 2. The web-app is fully Eliom-based: it uses the eliom{dep,c,opt}
> tool-chain, so it is incompatible with sexplib.syntax (because it imposes
> deriving) and takes ages to compile.
> (if I had to start again the project, I think I would not use the syntax
> part of ocsigen or at least limit it to one single file).
>
>
> I think I have already lost too many hours of my life fixing
> camlp4-related problems just for using type_conv, so:
>
>
> The proposal:
>
> Get something like dyntype [1] or what Pierre Chambart and Grégoire Henry
> presented at OUD [2], into the main compiler.
>
> type_conv and deriving will become obsolete.
>
> Then, most people can get rid of any kind of syntactic preprocessing for
> 95% of their problems.
>
> For the remaining 5%, they can use camlp4, camlp5, Fan, or write their own
> code generator without imposing it to anyone else.
>
>
>
> Cheers
> Seb
>
>
>
> [1] https://github.com/mirage/dyntype
> [2] http://oud.ocaml.org/2012/#program
>
>
>
>
> _______________________________________________
> wg-camlp4 mailing list
> wg-camlp4 at lists.ocaml.org
> http://lists.ocaml.org/listinfo/wg-camlp4
>
>
--
-- Regards, Hongbo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/wg-camlp4/attachments/20130205/f31510c7/attachment-0001.html>
More information about the wg-camlp4
mailing list