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:44)
From: Jean-Christophe Filliatre <filliatr@l...>
Subject: Re: [Caml-list] Map.fold behavior changed

EEK Cooper writes:
 > 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. 

I must agree  with you since we also  got a similar bug in  one of our
apps due to this Map.fold _implementation_ change.

However, we must also admit  that we were using an unspecified feature
of the  standard library. If  I remember correctly,  the documentation
was saying that  the traversal order was left  _unspecified_.  The new
version   of  Map.fold   simply  has   a  stronger,   but  consistent,
specification.  From this point of view, the Ocaml team thus cannot be

You (and I) were using  the _implementation_ as a specification, which
is bad :-)

Jean-Christophe Filliātre (