Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Help me find this pdf
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-10-19 (21:51)
From: Robert Fischer <robert@f...>
Subject: Re: [Caml-list] Re: Help me find this pdf

>> 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.