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.2 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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 15A15BC6B for ; Fri, 29 Jun 2007 20:21:23 +0200 (CEST) Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5TILMGs022133 for ; Fri, 29 Jun 2007 20:21:22 +0200 Received: from [192.168.1.222] (vil93-4-82-227-140-227.fbx.proxad.net [82.227.140.227]) by smtp5-g19.free.fr (Postfix) with ESMTP id 7E65C44A3D; Fri, 29 Jun 2007 20:21:22 +0200 (CEST) Message-ID: <46854DA1.9000403@philippewang.info> Date: Fri, 29 Jun 2007 20:21:21 +0200 From: Philippe Wang User-Agent: Thunderbird 1.5.0.12 (Macintosh/20070509) MIME-Version: 1.0 To: Jon Harrop , ocaml ml Subject: Re: [Caml-list] let int = ?([' ' '\t'] '-') digits+ References: <200706291639.39529.jon@ffconsultancy.com> <46852BBD.3020407@fischerventure.com> <200706291740.06735.jon@ffconsultancy.com> In-Reply-To: <200706291740.06735.jon@ffconsultancy.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 46854DA2.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; regexp:01 regexp:01 wrote:01 wrote:01 caml-list:01 int:01 match:02 match:02 programming:03 programming:03 let:03 ugly:04 ugly:04 digit:06 space:07 Jon Harrop wrote: > On Friday 29 June 2007 16:56:45 Robert C Fischer wrote: > >> How would I write f - 1 to mean "one less than the value of f"? >> > > As: > > f - 1 > > The space before the digit means that it will not match this regexp. > > Or: > > f-1 > > The lack of a space before the "-" means that it will not match this regexp. I think it's quite too hard to explain, and it leads you to make mistakes too easily. By the way, I wonder how you could explain that to students learning the language... What I think is that : - whether they know nothing about programming : then they end up thinking it's quite too ugly... - whether they already know something about programming : they would think that the language is ugly and stick to those they already know... Anyways, I really wouldn't want that. One should not have to spend ten years to learn a programming language, just because of such tricks. -- Philippe Wang mail[at]philippewang.info