From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q1H5Yx6U028011 for ; Fri, 17 Feb 2012 06:34:59 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArsBAG3mPU/RVdc2kGdsb2JhbABEsG0IIgEBAQEJCQ0HFAQjgXIBAQEDARICLAEUBx0BAwELBgUEAQY7IQEBEQEFARwGEyKHXZwRCotxgnGEdD+IcwIFC4hTgzAGAzQYA4NpFAIDgy4EiE6MaYsTgxY9hCA X-IronPort-AV: E=Sophos;i="4.73,434,1325458800"; d="scan'208";a="131762987" Received: from mail-lpp01m010-f54.google.com ([209.85.215.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 17 Feb 2012 06:34:53 +0100 Received: by lagz14 with SMTP id z14so5909194lag.27 for ; Thu, 16 Feb 2012 21:34:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=unrRvXD1l9/kbu3FRIU+3yWAp8X0TQAL14Y15vopQdM=; b=Bl2YSb6i2n4SMh9S9bsStSSQbW7JHmxlUkMUZOPXM+MJYBEtrhvtiSf5GISfLzmoVa sJqHI+o2AoByg4LSzyaAiH24ziek0Px8DD9VduPxRATVFLg46S6UgQJnh5dxqhFKciKG 4IklehEu/G8kn086jK/7s2xdZvWKbZGby1gbg= MIME-Version: 1.0 Received: by 10.152.122.74 with SMTP id lq10mr4818886lab.7.1329456892907; Thu, 16 Feb 2012 21:34:52 -0800 (PST) Received: by 10.152.132.165 with HTTP; Thu, 16 Feb 2012 21:34:52 -0800 (PST) In-Reply-To: References: Date: Fri, 17 Feb 2012 00:34:52 -0500 Message-ID: From: Markus Mottl To: bob zhang Cc: Caml List Content-Type: multipart/alternative; boundary=f46d043c0688d8913804b9224d66 Subject: Re: [Caml-list] Sexplib bug report --f46d043c0688d8913804b9224d66 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Feb 16, 2012 at 20:55, bob zhang wrote: > Is it possible to separate the syntax extension from the code > generation part? syntax extension is always fragile, code generation > API is still pretty useful. In my opinion, the main meat lies in code > generation part. > Not sure, but even if, I guess it would not be easy. > <:sexp< type t = bla bla >> maybe more robust, but it requires > camlp4of as the basic preprocessor instead of camlp4o If there were only one preprocessor (sexplib) this would work, but having more than one (e.g. also bin-prot) does not seem straightforward. It's not clear how multiple and independently developed code generators can be composed, especially safely without interfering with each other. Regards, Markus -- Markus Mottl http://www.ocaml.info markus.mottl@gmail.com --f46d043c0688d8913804b9224d66 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Feb 16, 2012 at 20:55, bob zhang <bobzhang1988@gmail.com> wrote:<= br>
Is it possible to separate the syntax extension from the code
generation part? syntax extension is always =A0fragile, code generation
API is still pretty useful. In my opinion, the main meat lies in code
generation part.

Not sure, but even if,= I guess it would not be easy.
=A0
<:sexp< type t =3D bla bla >> maybe more robust, but it require= s
camlp4of as the basic preprocessor instead of camlp4o

=
If there were only one preprocessor (sexplib) this would work, b= ut having more than one (e.g. also bin-prot) does not seem straightforward.= =A0It's not clear how multiple and independently developed code genera= tors can be composed, especially safely without interfering with each other= .

Regards,
Markus

-- =
Markus Mottl=A0 =A0 =A0 =A0 http://ww= w.ocaml.info=A0 =A0 =A0 =A0 m= arkus.mottl@gmail.com
--f46d043c0688d8913804b9224d66--