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
Undefined evaluation order
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Thorsten Ohl <ohl@h...>
Subject: Re: Undefined evaluation order
Brian Rogoff <> writes:

> For OCaml it appears that the perspective adopted is that the
> programmer must make the temporal dependencies explicit. [...] it is
> mentioned that this usually leads to clearer programs.  I'm sure the
> bytecode compiler argument is valid, but not the code clarity one

Maybe I have ben brainwashed by too much Fortran, but depending on
side effects in the evaluation of function arguments that change the
result according to the evaluation order is not good style, IMHO.
Explicit `let' bindings are clear and improve the likelihood that the
author will still be able to understand his/her code a few year later

I agree that leaving this important chunk of the semantics unspecified
is not nice, but closing the door on parallelism forever would be much
worse, IMHO.

(Only half-joking) There should be an option in the compiler
randomizing evaluation order for debugging ...
Thorsten Ohl, Physics Department, TU Darmstadt -- [<=== PGP public key here]