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
Map.fold behavior changed
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-02-24 (11:22)
From: EEK Cooper <s0567141@s...>
Subject: Map.fold behavior changed
Hi all,

My team just noticed that the behavior of Map.fold changed in OCaml 
version 3.08.4.

I'm concerned that the OCaml team would change the behavior of a 
library function so late in its life. I understand that it was thought 
to be "wrong" <>, but 
changing the behavior of an existing function breaks existing apps and 
shouldn't be done lightly. Such changes should, of course, be carefully 
highlighted in a change log as *incompatible* changes, requring updates 
to existing programs--this one was buried under "bug fixes." The old 
behavior was apparently longstanding since 1995 
<;f=h>. If OCaml is meant to be a practical programming language, it should provide consistency for its users from version to 

That said, we're now in the position where we need to compile different 
code depending on the version of OCaml. What's the best way to do 
conditional compilation in OCaml? Should we use cpp and #ifdef, or is 
there a more OCaml-savvy solution?

Thanks in advance,