From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 393D7BC0B for ; Mon, 15 Jan 2007 19:29:17 +0100 (CET) Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0FITGwo029262 for ; Mon, 15 Jan 2007 19:29:16 +0100 Received: from out1.internal (unknown [10.202.2.149]) by out1.messagingengine.com (Postfix) with ESMTP id 2EF337BBF2; Mon, 15 Jan 2007 13:29:16 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by out1.internal (MEProxy); Mon, 15 Jan 2007 13:29:16 -0500 X-Sasl-enc: H/okgrpMgxfJTuhz4NWbQtDwTJR1bHR+iHUyCdgnnxh7 1168885755 Received: from [172.16.112.115] (burnham.ljcrf.edu [192.231.106.2]) by mail.messagingengine.com (Postfix) with ESMTP id 5F6C01DF04; Mon, 15 Jan 2007 13:29:15 -0500 (EST) Date: Mon, 15 Jan 2007 10:28:24 -0800 (PST) From: Martin Jambon X-X-Sender: martin@localhost To: Nicolas Pouillard Cc: Vincent Hanquez , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ocaml compiler features In-Reply-To: Message-ID: References: <45A87011.8080203@gmail.com> <53c655920701122341l3b95328clf4e9ee40d5656dde@mail.gmail.com> <45AA6966.8010602@gmail.com> <200701141823.32855.jon@ffconsultancy.com> <20070114184148.GA26213@snarc.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at discorde with ID 45ABC7FC.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ens-lyon:01 ocaml:01 compiler:01 syntax:01 syntaxes:01 camlp:01 ocaml:01 camlp:01 syntaxes:01 syntax:01 cmo:01 cmo:01 foo:01 foo:01 unreadable:01 On Mon, 15 Jan 2007, Nicolas Pouillard wrote: > On 1/14/07, Vincent Hanquez wrote: > > and create lots of different syntax which make the code unsharable at > > the end (each one using different syntaxes). > > > > I think camlp4 is the not the proper way to extends the language, and is > > definitevely *NOT* going to improve the world of OCaml. > > > > Although remind you that a property of camlp4 syntaxes is that you can > trivially convert an input source in plain (indented) OCaml code. This > is done using the Pr_o module, an OCaml pretty printer. > > Thus, you can share it. > > $ camlp4 some_strange_syntax.cmo pr_o.cmo foo.ml -o foo_ocaml.ml Getting standard OCaml code doesn't guarantee that you can do something with it: in the case of syntax extensions, the result will be most likely unreadable. But the real problem is that there is no way of reverting back to the original source code. So if you write your programs in the revised syntax, all patches must be written in the revised syntax. Martin -- Martin Jambon http://martin.jambon.free.fr