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=AWL 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 640D0BC0C for ; Mon, 15 Jan 2007 22:32:30 +0100 (CET) Received: from pih-relay05.plus.net (pih-relay05.plus.net [212.159.14.132]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0FLWR53003483 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 15 Jan 2007 22:32:30 +0100 Received: from [80.229.56.224] (helo=[10.0.0.5]) by pih-relay05.plus.net with esmtp (Exim) id 1H6ZRK-00060w-CB for caml-list@yquem.inria.fr; Mon, 15 Jan 2007 21:32:26 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ocaml compiler features Date: Mon, 15 Jan 2007 21:30:44 +0000 User-Agent: KMail/1.9.5 References: <45A87011.8080203@gmail.com> <20070115000544.GA28731@snarc.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200701152130.44615.jon@ffconsultancy.com> X-Miltered: at discorde with ID 45ABF2EB.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 compiler:01 ocaml:01 syntax:01 camlp:01 syntax:01 parsing:01 parsing:01 camlp:01 23,:98 frog:98 beginners:01 wrote:01 imho:01 caml-list:01 On Monday 15 January 2007 20:23, Martin Jambon wrote: > OCaml is well-enough designed so that there is no "common" syntax > extension. The camlp4-based syntax extension for lazy stream parsing could be considered a "common" extension because it is bundled with OCaml and is used by lots of people. I used it in several of the tutorial papers on our site simply because it is the most succinct approach to parsing: http://www.ffconsultancy.com/free/ocaml/parsing.html http://www.ffconsultancy.com/free/ocaml/interpreter.html It may be superceded by active patterns but I'd still like to see this syntax incorporated into OCaml itself. > The problem is that people use it for a variety of things, and > each domain may benefit from particular enhancements of the syntax. try ... finally is another syntax extension that I think would be welcomed by all. > Either you incorporate all those extensions into the standard syntax, > which is totally insane, or you consider them just as libraries. I think there are several camlp4 syntax extensions that are sufficiently useful that we would all benefit from them being incorporated into the language. > IMHO the problem is more that writing camlp4 syntax extensions is very > different from writing everyday OCaml code. In other words, > it is inaccessible to beginners, I highly recommend this web page by some guy called Martin Jambon: ;-) http://martin.jambon.free.fr/extend-ocaml-syntax.html Your page is really the only resource on the web that aims to elucidate camlp4. It is very good, but I still failed to write the syntax extension that I wanted (symbolic expressions as patterns). > OK, there are many issues to solve, and it may not look as simple as > advertised, but I am sure it can be done. All good ideas. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists