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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 46913BC69 for ; Fri, 19 Oct 2007 16:48:16 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAENgGEfAXQInh2dsb2JhbACOVwIBCAop X-IronPort-AV: E=Sophos;i="4.21,301,1188770400"; d="scan'208";a="3353250" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 19 Oct 2007 16:48:16 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l9JEmFXj007011 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 19 Oct 2007 16:48:16 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAH5gGEfQccgFfWdsb2JhbACOVwIJBAYCDxEH X-IronPort-AV: E=Sophos;i="4.21,301,1188770400"; d="scan'208";a="3363195" Received: from lax-green-bigip-5.dreamhost.com (HELO looneymail-a4.g.dreamhost.com) ([208.113.200.5]) by mail2-smtp-roc.national.inria.fr with ESMTP; 19 Oct 2007 16:48:15 +0200 Received: from carols-computer-3.local (unknown [74.202.102.226]) by looneymail-a4.g.dreamhost.com (Postfix) with ESMTP id 3C0371260B6; Fri, 19 Oct 2007 07:48:11 -0700 (PDT) Message-ID: <4718C3AA.9050503@fischerventure.com> Date: Fri, 19 Oct 2007 09:48:10 -0500 From: Robert Fischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Christophe Raffalli Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: Help me find this pdf References: <200710181457.58077.jon@ffconsultancy.com> <47176C28.1090509@janestcapital.com> <200710181818.31430.jon@ffconsultancy.com> <20071019152311.25cdf410.mle+ocaml@mega-nerd.com> <4718A220.4030708@univ-savoie.fr> In-Reply-To: <4718A220.4030708@univ-savoie.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4718C3AF.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 syntax:01 compilation:01 haskell:01 ocaml:01 trivial:01 semantics:01 haskell:01 semantics:01 caml-list:01 lazy:02 lazy:02 match:02 pattern:04 nightmare:04 > You mean that if I write (I use OCaml syntax) > > match p, q with > | (true, true) -> > | _ -> > > > This would mean that compilation of pattern matching in Haskell is a real nightmare ... (this is > already very painfull in OCaml) ... In fact, this also means that it is not trivial to explain > to the programmer the semantics of deep pattern-matching chosen by a given lazy language ... > > In Ocaml the programmer really needs to say what he/she wants and can implement the above test by > hand and it may be considered as a good thing ? > > There's a philosophical difference here between Haskell and Ocaml. Haskell considers it harmful (they call it "impure") for the programmer to know when X is evaluated, and (by implication) therefore considers it acceptable for Heisenbugs and vague semantics to be standard aspects of the language. Ocaml, on the other hand, requires much more explicitness, particularly around theoretically beautiful but potentially harmful things like lazy evaluation. ~~ Robert.