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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id B452CBC69 for ; Fri, 19 Oct 2007 23:51:58 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAHXDGEfQccgFfWdsb2JhbACOVQEBCQQGAiAH X-IronPort-AV: E=Sophos;i="4.21,302,1188770400"; d="scan'208";a="4868776" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 19 Oct 2007 23:51:59 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l9JLpvMG021374 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 19 Oct 2007 23:51:58 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAHXDGEfQccgFfWdsb2JhbACOVQEBCQQGAiAH X-IronPort-AV: E=Sophos;i="4.21,302,1188770400"; d="scan'208";a="4868775" Received: from lax-green-bigip-5.dreamhost.com (HELO looneymail-a1.g.dreamhost.com) ([208.113.200.5]) by mail3-smtp-sop.national.inria.fr with ESMTP; 19 Oct 2007 23:51:57 +0200 Received: from carols-computer-3.local (unknown [74.202.102.226]) by looneymail-a1.g.dreamhost.com (Postfix) with ESMTP id 64DFF15E03A; Fri, 19 Oct 2007 14:51:53 -0700 (PDT) Message-ID: <471926F8.2010809@fischerventure.com> Date: Fri, 19 Oct 2007 16:51:52 -0500 From: Robert Fischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Andreas Rossberg 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> <4718C3AA.9050503@fischerventure.com> <4234F84D-BEC4-4850-B051-D38E8EA38918@mpi-sws.mpg.de> In-Reply-To: <4234F84D-BEC4-4850-B051-D38E8EA38918@mpi-sws.mpg.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 471926FD.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; haskell:01 ocaml:01 haskell:01 semantics:01 ocaml:01 semantically:01 bug:01 caml-list:01 lazy:02 defining:02 debugging:03 laziness:05 debug:05 vague:07 standard:07 >> 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. The way I understand it, the omnipresent laziness of Haskell is at least partly justified because it is a way of encouraging being functionally pure. Is that wrong? > 6. Nevertheless, evaluation is fully deterministic, thus it certainly > cannot cause Heisenbugs, neither semantically nor performance-wise. If I put in a debug statement, it will like change the timing when something gets forced, right? This, in turn, can change all kinds of time/space performance characteristics, and potentially even the code that is executed (through interrupting deforestation). So your debugging statements might well change the very characteristic of the program that you're defining as a bug. ~~ Robert.