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=1.5 required=5.0 tests=AWL,SPF_NEUTRAL 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 4B716BC0B for ; Mon, 15 Jan 2007 10:35:55 +0100 (CET) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.181]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0F9ZsTu024522 for ; Mon, 15 Jan 2007 10:35:54 +0100 Received: by py-out-1112.google.com with SMTP id a78so801476pyh for ; Mon, 15 Jan 2007 01:35:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=uHGkHy2H44VMOSFtkJ9wlF64Twdcj/XQxtVWdiiXFhN3oyId2k3pucrdN0OtxDjEOCeb2OwpDSPc4fneH8/T5jULlpGwfDmxARh8HLDt2a+/xmuEdYnot0Ks2wd4sibXTVnky4+HXopfCAN2kHvkn5DG531+fg3TvfS4jB+RUQQ= Received: by 10.35.38.17 with SMTP id q17mr7252142pyj.1168853753949; Mon, 15 Jan 2007 01:35:53 -0800 (PST) Received: by 10.35.95.3 with HTTP; Mon, 15 Jan 2007 01:35:53 -0800 (PST) Message-ID: Date: Mon, 15 Jan 2007 10:35:53 +0100 From: "Nicolas Pouillard" To: "Vincent Hanquez" Subject: Re: [Caml-list] Ocaml compiler features Cc: "Jon Harrop" , caml-list@yquem.inria.fr In-Reply-To: <20070114184148.GA26213@snarc.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45A87011.8080203@gmail.com> <53c655920701122341l3b95328clf4e9ee40d5656dde@mail.gmail.com> <45AA6966.8010602@gmail.com> <200701141823.32855.jon@ffconsultancy.com> <20070114184148.GA26213@snarc.org> X-j-chkmail-Score: MSGID : 45AB4AFA.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 45AB4AFA.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 compiler:01 camlp:01 compiler:01 syntax:01 camlp:01 ocaml:01 syntax:01 syntaxes:01 syntaxes:01 cmo:01 cmo:01 foo:01 foo:01 wrote:01 On 1/14/07, Vincent Hanquez wrote: > On Sun, Jan 14, 2007 at 06:23:32PM +0000, Jon Harrop wrote: > > > > > If you're bored with > > > > > begin/end a good solution might be to define a new construct using > > > > > camlp4 instead of hacking the compiler. It's the good advice in > > > > > general for syntax problems. > > > > > > Writing things in camlp4 could help me, but won't improve the world of > > > ocaml. > > > > It will if you do something more productive with camlp4, like try...finally > > or ... > > 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 -- Nicolas Pouillard