From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 F05D2BC75 for ; Mon, 28 Feb 2005 11:17:04 +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 j1SAH4xw017910 for ; Mon, 28 Feb 2005 11:17:04 +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 LAA23771 for ; Mon, 28 Feb 2005 11:17:04 +0100 (MET) Received: from alex.barettalocal.com (h213-255-109-130.albacom.net [213.255.109.130] (may be forged)) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1SAH2he004526 for ; Mon, 28 Feb 2005 11:17:03 +0100 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by alex.barettalocal.com (Postfix) with ESMTP id 9E3722BAC11 for ; Mon, 28 Feb 2005 11:17:02 +0100 (CET) Message-ID: <4222EF9E.1030106@barettadeit.com> Date: Mon, 28 Feb 2005 11:17:02 +0100 From: Alex Baretta User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 X-Accept-Language: it, en-us, en MIME-Version: 1.0 To: Ocaml Subject: Fragile pattern matching?! Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4222EFA0.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4222EF9E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; baretta:01 bool:01 bool:01 compiler:01 baretta:01 exception:01 int:01 int:01 match:02 compiling:02 string:03 string:03 float:03 float:03 raise:03 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.9 required=5.0 tests=FORGED_RCVD_HELO,PLING_QUERY autolearn=disabled version=3.0.2 X-Spam-Level: We have an incomprehensibile warning when compiling code that looks like the following: type value = | Int of int | Float of float | Int32 of int32 | Int64 of int64 | Bool of bool | String of string let to_int value = match value with | Int x -> x | _ -> raise Some_exception The compiler signals a warning for a fragile pattern matching at the "_" character. Why in the world should this code signal such a warning? Alex -- ********************************************************************* http://www.barettadeit.com/ Baretta DE&IT A division of Baretta SRL tel. +39 02 370 111 55 fax. +39 02 370 111 54 Our technology: The Application System/Xcaml (AS/Xcaml) The FreerP Project