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.6 required=5.0 tests=NO_REAL_NAME 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 6D8ACBC0B for ; Mon, 15 Jan 2007 19:58:32 +0100 (CET) Received: from server2.thinkcrime.de (server2.thinkcrime.de [213.133.110.149]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0FIwWM0003411 for ; Mon, 15 Jan 2007 19:58:32 +0100 Received: from hod-sarge-2005-10.lan.m-e-leypold.de (dslb-088-072-209-051.pools.arcor-ip.net [88.72.209.51]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server2.thinkcrime.de (Postfix) with ESMTP id EB12C488016 for ; Mon, 15 Jan 2007 19:58:33 +0100 (CET) Received: by hod-sarge-2005-10.lan.m-e-leypold.de (Postfix, from userid 1003) id B2155380DD; Mon, 15 Jan 2007 20:02:48 +0100 (CET) To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ocaml compiler features References: <45A87011.8080203@gmail.com> <53c655920701122341l3b95328clf4e9ee40d5656dde@mail.gmail.com> <45AA6966.8010602@gmail.com> <200701141823.32855.jon@ffconsultancy.com> <20070114184148.GA26213@snarc.org> From: ls-ocaml-developer-2006@m-e-leypold.de Date: Mon, 15 Jan 2007 20:02:48 +0100 In-Reply-To: (Martin Jambon's message of "Mon, 15 Jan 2007 10:28:24 -0800 (PST)") Message-ID: User-Agent: Some cool user agent (SCUG) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at discorde with ID 45ABCED8.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 compiler:01 ens-lyon: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 Martin Jambon writes: > 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. Yes. And the worst thing is, that your "original" source will only be usable as long as the syntax extension is being maintained by someone. You might even have to take over maintenance yourself at the end. That might be a big cost for a bit of syntactic sugar in the long run. Regards -- Markus