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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 17915BC69 for ; Fri, 19 Oct 2007 23:44:05 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAEvBGEfAXQImh2dsb2JhbACOVQEBAQgKKQ X-IronPort-AV: E=Sophos;i="4.21,302,1188770400"; d="scan'208";a="3369000" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 19 Oct 2007 23:44:04 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l9JLi3E0021183 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 19 Oct 2007 23:44:04 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAFXCGEeLEwECbWdsb2JhbACOVQsEBgkHGQ X-IronPort-AV: E=Sophos;i="4.21,302,1188770400"; d="scan'208";a="3375319" Received: from mpiat0400.mpi-sb.mpg.de (HELO francois.mpi-sb.mpg.de) ([139.19.1.2]) by mail2-smtp-roc.national.inria.fr with ESMTP; 19 Oct 2007 23:44:03 +0200 Received: from loopback.mpi-sb.mpg.de ([127.0.0.1]:53388 helo=localhost ident=amavis) by francois.mpi-sb.mpg.de (envelope-from ) with esmtp (Exim 4.50) id 1IizdT-0003N5-Cx for caml-list@inria.fr; Fri, 19 Oct 2007 23:44:03 +0200 Received: from francois.mpi-sb.mpg.de ([127.0.0.1]) by localhost (aspirin.mpi-sb.mpg.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12945-01 for ; Fri, 19 Oct 2007 23:44:03 +0200 (CEST) Received: from zak.mpi-sb.mpg.de ([139.19.1.28]:51711) by francois.mpi-sb.mpg.de (envelope-from ) with esmtp (Exim 4.50) id 1IizdP-0003IP-3w; Fri, 19 Oct 2007 23:43:59 +0200 Received: from p54a59e8b.dip0.t-ipconnect.de ([84.165.158.139]:64913 helo=[192.168.178.21]) by zak.mpi-sb.mpg.de with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.50) id 1IizdO-0007xW-KR; Fri, 19 Oct 2007 23:43:58 +0200 X-Notes-Item: NOT CHECKED; name=$DNSBLSite In-Reply-To: <4718C3AA.9050503@fischerventure.com> 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> <4718C3AA.9050503@fischerventure.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <4234F84D-BEC4-4850-B051-D38E8EA38918@mpi-sws.mpg.de> Content-Transfer-Encoding: 7bit From: Andreas Rossberg Subject: Re: [Caml-list] Re: Help me find this pdf Date: Fri, 19 Oct 2007 23:43:42 +0200 To: caml-list@inria.fr X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mpi-sb.mpg.de X-Miltered: at discorde with ID 47192523.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; rossberg:01 rossberg:01 haskell:01 ocaml:01 haskell:01 semantics:01 ocaml:01 semantics:01 semantically:01 unspecified:01 semantically:01 mpg:98 2007,:98 wrote:01 compilers:01 On Oct 19, 2007, at 16.48h, Robert Fischer wrote: > 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. Wow, that made my FUD sensors go wild. To counter some of the misinformation: 1. Purity and evaluation regime are separate issues. You can very well have a pure language that is eager. 2. However, in a pure language the details of evaluation order are largely immaterial to its semantics, which obviously is an advantage. 3. Lazy evaluation by itself is as precise an evaluation scheme as eager evaluation. There is no inherent vagueness. 4. In fact, the semantics of OCaml arguably is more vague than that of Haskell, because evaluation order is underspecified (and can vary between compilers) even where it matters semantically. Haskell only leaves it unspecified where it is not semantically observable. 5. The problem with Haskell and laziness on the other hand is not semantic bugs, but the fact that it can make space complexity hard to predict sometimes. 6. Nevertheless, evaluation is fully deterministic, thus it certainly cannot cause Heisenbugs, neither semantically nor performance-wise. - Andreas