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 73A5CBC0B for ; Mon, 15 Jan 2007 23:17:56 +0100 (CET) Received: from hades.snarc.org (hades.snarc.org [212.85.152.11]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0FMHuCu013262 for ; Mon, 15 Jan 2007 23:17:56 +0100 Received: by hades.snarc.org (Postfix, from userid 1000) id 9306E1B481; Mon, 15 Jan 2007 23:17:17 +0100 (CET) Date: Mon, 15 Jan 2007 23:17:17 +0100 To: Martin Jambon Cc: Jon Harrop , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ocaml compiler features Message-ID: <20070115221717.GA9982@snarc.org> References: <45A87011.8080203@gmail.com> <200701141823.32855.jon@ffconsultancy.com> <20070114184148.GA26213@snarc.org> <200701142049.57959.jon@ffconsultancy.com> <20070115000544.GA28731@snarc.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Warning: Email may contain unsmilyfied humor and/or satire. User-Agent: Mutt/1.5.13 (2006-08-11) From: tab@snarc.org (Vincent Hanquez) X-Miltered: at discorde with ID 45ABFD94.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 compiler:01 ocaml:01 syntax:01 syntax:01 lambda:01 camlp:01 camlp:01 beginners:01 beginners:01 wrote:01 imho:01 grammar:01 caml-list:01 functions:01 On Mon, Jan 15, 2007 at 12:23:32PM -0800, Martin Jambon wrote: > OCaml is well-enough designed so that there is no "common" syntax > extension. There ARE common syntax extensions. how many people miss a try-except-finally construct ? how many people miss a return statement to break the flow of a function. etc .. I'm not talking about weird extensions that ease the life of grammar writter or lambda calculus , etc .. but really the basic one. I still think camlp4 is a good idea for limited use like this. > The problem is that people use it for a variety of things, and > each domain may benefit from particular enhancements of the syntax. > Either you incorporate all those extensions into the standard syntax, > which is totally insane, or you consider them just as libraries. Loading > a library is no big deal, whether it provides more functions or more > syntax. I'm especially not talking about all extensions, but obviously the ones that everybody can use, whatever they works on. > 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, and most other people think it's too > complicated anyway. It requires too much expertise and only few people are > able to maintain such code. What about the beginners then ? All what you suggest below doesn't really help making it more accessible I think. > Here is a list of things that I suggest if one ever wants to have a > standard and widely use way of extending the syntax in OCaml: > [snip] I like this special "macro" keyword and this should also be part of the language. So does some specific construction like try-finally. -- Vincent Hanquez