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 (14:48)
From: Robert Fischer <robert@f...>
Subject: Re: [Caml-list] Re: Help me find this pdf

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