From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 84E50BB9C for ; Thu, 24 Nov 2005 10:41:41 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jAO9ffCf009991 for ; Thu, 24 Nov 2005 10:41:41 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA20409 for ; Thu, 24 Nov 2005 10:41:40 +0100 (MET) Received: from yquem.inria.fr (yquem.inria.fr [128.93.8.37]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jAO9fetS012948; Thu, 24 Nov 2005 10:41:40 +0100 Received: by yquem.inria.fr (Postfix, from userid 18041) id 05479BB9C; Thu, 24 Nov 2005 10:41:40 +0100 (CET) Date: Thu, 24 Nov 2005 10:41:39 +0100 To: Christophe Raffalli Cc: Luc Maranget , sejourne_kevin , caml-list Subject: Re: [Caml-list] Request for complete pattern matching Message-ID: <20051124094139.GC9830@yquem.inria.fr> References: <43839F1A.2080909@univ-savoie.fr> <43842069.3070700@yahoo.fr> <43848103.9060504@univ-savoie.fr> <20051123183134.GB6446@yquem.inria.fr> <4384D785.5010106@univ-savoie.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4384D785.5010106@univ-savoie.fr> User-Agent: Mutt/1.5.9i From: luc.maranget@inria.fr (Luc Maranget) X-Miltered: at concorde with ID 43858AD5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 43858AD4.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 maranget:01 maranget:01 compiler:01 expansive:01 camlp:01 compiler:01 camlp:01 luc:01 luc:01 patterns:02 patterns:02 match:02 match:02 transform:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 > > I agree that your translation works (I should try). I am just wondering > about the cost (compared to a reasonable implementation inside the > compiler) ? > More expansive as camlp4 than coded inside the compiler. But well, is cost a real problem here ? > That would probably be not so dramatic ... except I should not transform > pattern matching that do not use the new extension ... the camlp4 code > will probably tripple what I have. Not necesssarily, I guess, there is no need to transform patterns without <=. An easy way out would be to introduce a new kind of match expressions (extend_match ... with .. ) which would be the only one to accept <= in patterns. > > So for my extension of pattern matching with function application, I > think, I prefer to wait an adoption of a similar feature rather than > doing it myself. bindlib-3.0 will be ok without this extention of the > pattern matching. I may not have been as clear as I wish to: I will not implement this. As you see, it is really complicated (think about or-patterns, or nested <=, for instance). However, something like 'break' could perhaps be introduced in a forseable future. -- Luc